program aaa
implicit none

integer :: k, i, j
integer, dimension(5) :: a

do i=1, 5
read*, a(i)
end do
read*, k

do i=1, 5
 do j=i+1, 5
 if(abs(a(i)-a(j))>k) then
 write(*,'(a2)') ':('
 return
 end if
 end do
end do

write(*,'(a4)') 'Yay!'

end program