Program ABC123A

integer a,b,c,d,e,k,p(10)

read(*,*) a,b,c,d,e,k

p(1)=b-a
p(2)=c-a
p(3)=d-a
p(4)=e-a
p(5)=c-b
p(6)=d-b
p(7)=e-b
p(8)=d-c
p(9)=d-c
p(10)=e-d

do i=1,10
 if (p(i)>k) then
  write(*,*) ':('
  go to 10
 end if
end do

write(*,*) 'Yay!'

10 stop
end