Problem:


﻿Score: 100 points

Problem Statement

In AtCoder city, there are five antennas standing in a straight line. They are called Antenna A, B, C, D and E from west to east, and their coordinates are a, b, c, d and e, respectively.

Two antennas can communicate directly if the distance between them is k or less, and they cannot if the distance is greater than k.

Determine if there exists a pair of antennas that cannot communicate directly.

Here, assume that the distance between two antennas at coordinates p and q (p < q) is q - p.  

Constraints

a, b, c, d, e and k are integers between 0 and 123 (inclusive).

a < b < c < d < e

Input

Input is given from Standard Input in the following format:

a
b
c
d
e
k

Output

Print :( if there exists a pair of antennas that cannot communicate directly, and print Yay! if there is no such pair.

Sample Input 1

1
2
4
8
9
15

Sample Output 1

Yay!

In this case, there is no pair of antennas that cannot communicate directly, because:

the distance between A and B is 2 - 1 = 1

the distance between A and C is 4 - 1 = 3

the distance between A and D is 8 - 1 = 7

the distance between A and E is 9 - 1 = 8

the distance between B and C is 4 - 2 = 2

the distance between B and D is 8 - 2 = 6

the distance between B and E is 9 - 2 = 7

the distance between C and D is 8 - 4 = 4

the distance between C and E is 9 - 4 = 5

the distance between D and E is 9 - 8 = 1

and none of them is greater than 15. Thus, the correct output is Yay!.

Sample Input 2

15
18
26
35
36
18

Sample Output 2

:(

In this case, the distance between antennas A and D is 35 - 15 = 20 and exceeds 18, so they cannot communicate directly.
Thus, the correct output is :(.



Sample input:
1
2
4
8
9
15


Sample output:
Yay!

Submission status: Wrong Answer

Solution code:
a = list(map(int,[input() for i in range(5)]))
k = int(input())

ans = True
for i in range(5):
    for j in range(i+1,5):
        if (a[j]-a[i]) > 15:
            ans = False

if ans:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
print ("Yay!") if e-k <= k else print (":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
x = e-a
if x <= 15:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = input()
c = input()
d = input()
e = int(input())
k = input()
x = e-a
if x <= 15:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
list = [int(input()) for i in range(5)]
K = int(input())
lists = sorted(list)
no = 0
for I in range(4):
  if lists[no+1] - lists[no] <= K:
    no += 1
  else:
    print(":(")
    exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys
#import numpy as np
import math
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
from fractions  import gcd

input=sys.stdin.readline
x=[int(input()) for _ in range(5)]
k=int(input())

if x[-1]-x[0]<k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a,b=5,10
for i in range(5):
    i=int(input())
    a+=(i-1)//10
    if 0<i%10<b:
        b=i%10
print(a*10-(10-b))

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if k>b-a:
  print(":(")
elif k> c-a:
  print(":(")
elif k> d-a:
  print(":(")
elif k> e-a:
  print(":(")
elif k> c-b:
  print(":(")
elif k> d-b:
  print(":(")
elif k> e-b:
  print(":(")
elif k> d-c:
  print(":(")
elif k> e-c:
  print(":(")
elif k> e-d:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
if a[4] - a[0] < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(5):
    a+=input()
n=int(input())
count=0
for c in range(5):
    for i in range(c,5):
        z=abs(int(a[c])-int(a[i]))
        if z>n:
            count+=1
if count==0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(5):
    a+=input()
n=input()
count=0
for c in range(5):
    for i in range(c,5):
        if a[c]+a[i]>n:
            count+=1
if count==0:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
*l,k=map(int,open(0))
print('Yay!' if all([l[i]-l[-~i]<=k for i in range(4)]) else ':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
ma = a
mi = a
for i in range(4):
  x = int(input())
  if ma < x:
    ma = x
  elif mi > x:
    mi = x
if ma - mi < int(input()):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
ma = a
mi = a
for i in range(4):
  x = int(input())
  if ma < x:
    ma = x
  elif mi > x:
    mi = x
if ma - mi > int(input()):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
ma = 0
mi = 123
for i in range(5):
  x = int(input())
  if ma < x:
    ma = x
  elif mi > x:
    mi = x
if ma - mi > int(input()):
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
L = []
for i in range(5):
    L.append(int(input()))
k = int(input())
if L[4]-L[0] > k:
    print(":(")
else:
    print("Yey!")

Submission status: Wrong Answer

Solution code:
L = [int(input()) for i in range(5)]
k = int(input())

for i in range(4):
  if L[i+1] - L[i] > k:
    print(":(")
    break
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k=[int(input()) for i in range(6)]
if e-a<=k:
  print("Yay!")
else:
  print(":()")

Submission status: Wrong Answer

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
def main():
    a=I()
    b=I()
    c=I()
    d=I()
    e=I()
    k=I()
    yn= 'Yay!' if e-a<k else ':('
    print(yn)
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())
for i in range(4):
    e = int(input())
k = int(input())
if e - a <= 15:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
l=[int(input()) for i in range(6)]
k=l[5]
c=0
for i in range(4):
    for j in range(i+1,5):
        if abs(l[j]-l[i])<k:
            c+=1
if c==10:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
l=[int(input()) for i in range(6)]
k=l[5]
c=0
for i in range(4):
    for j in range(i+1,5):
        if l[j]-l[i]<k:
            c+=1
if c==10:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
d = [int(input()) for i in range(5)]
k = int(input())
ans = 'Yey!'
for i in d:
    for j in d:
        if abs(i-j)>k:
            ans = ':('
print(ans)

Submission status: Wrong Answer

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()

list=list()
list.append(a)
list.append(b)
list.append(c)
list.append(d)
list.append(e)

list.sort()
num=int(list[4])-int(list[0])

if num<=int(k):
  print('Yay!')
else :
  print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
def ABC_123_A():

    a = [0 for i in range(6)]

    count=0
   
    for i in range(6):
        a[i] = int(input())

    for i in range(6):
        for j in range(5):
            if i+j+1 <= 5:
                if a[i] - a[i+j+1] > 15:
                    count=1
                else:
                    count+=0
            else:
                count+=0
    if count == 1:
        print(':(')
    else:
        print('Yay!')

if __name__ == '__main__':

    ABC_123_A()

Submission status: Wrong Answer

Solution code:
l=[]
for i in range(5):l.append(int(input()))
k=int(input())
c=0
for i in l:
    for j in l:
        if abs(i-j)>k: c+=1
print('yay!' if c==0 else ':(')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if e-a>=k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:

A=[int(input()) for _ in range(5)]
k=int(input())

for i in range(4):
	if abs(A[i]-A[i+1])>k:
		print(":(")
		exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
lis = []
for i in range(5):
    lis.append(int(input()))

K = int(input())

for i in range(5):
    for j in range(i, 5):
        if lis[j]-lis[i] > K:
            print(":)")
            exit()

print("Yay!")

Submission status: Wrong Answer

Solution code:
l = [input() for i in range(5)]
k = int(input())
if int(l[0]) - int(l[4]) <= k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in range(6)]
f = True
if abs(l[0] - l[1] > l[5]) or abs(l[0] - l[2] > l[5]) or abs(l[0] - l[3] > l[5]) or abs(l[0] - l[4] > l[5]):
    f = False
if abs(l[1] - l[2] > l[5]) or abs(l[1] - l[3] > l[5]) or abs(l[1] - l[4] > l[5]):
    f = False
if abs(l[2] - l[3] > l[5]) or abs(l[2] - l[4] > l[5]):
    f = False
if abs(l[3] - l[5] > l[5]):
    f = False
print('Yay!' if f else ':(')

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in range(6)]
f = True
for i in range(4):
    if abs(l[i] - l[i + 1]) > l[5]:
        f = False
print('Yay!' if f else ':(')

Submission status: Wrong Answer

Solution code:
n=int(input())
trans=[int(input()) for i in range(5)]
d=min(trans)

if n%d == 0:
    print(n//d +4)#(n//d +(0 or 1))最も運べる人数が少ない交通機関がn人を運ぶのにかかる時間
else:
    print((n//d +1) +4)

Submission status: Wrong Answer

Solution code:
n=list([i for i in range(5)])
a=int(input())
b=0
for i in n:
  if i==i:
    break
  elif i-i<0:
    break
  elif i-i>k:
    b+=1
if b>0:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ab = b-a
ac = c-a
ad = d-a
ae = e-a
bc = c-b
bd = d-b
be = e-b
cd = d-c
ce = e-c
de = e-d
if ab <	k and ac < k and ad < k	and ae < k and bc < k and bd < k and be	< k and	cd < k and ce <	k and de < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
ab = b-a
ac = c-a
ad = d-a
ae = e-a
bc = c-b
bd = d-b
be = e-b
cd = d-c
ce = e-c
de = e-d
if ab <	k and ac < k and ad < k	and ae < k and bc < k and bd < k and be	< k and	cd < k and ce <	k and de < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
def five_antennas(li, k):

    return "Yay!" if max(li)-min(li) < k else ":("
def main():
    li = [int(input())for i in range(5)]
    k = int(input())
    print(five_antennas(li, k))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a_list = []
for i in range(5):
  a_list.append(int(input()))
k = int(input())

frag = True
for i in range(1,5):
  if a_list[i] - a_list[i-1] > k:
    frag = False
    
if frag == True:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if abs(a-b)<=k and abs(b-c)<=k and abs(c-d)<=k and abs(d-e)<=k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if b-a>k or c-b>k or d-c>k or e-d>k:
	print(":(")
else:
	print("Yay!")

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
if k > a[4] - a[0]:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if b - a <= k and c - b <= k and d - c <= k and e - d <= k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
import itertools

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

for v in itertools.combinations([a, b, c, d, e], 2):
    print(v)
    if v[1]-v[0] > k:
        print(':(')
        exit()

print('Yay')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
l=[a,b,c,d,e]
if max(l)-min(l)>k:
    print(':(')
else:
    print('Yay!!')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
l=[a,b,c,d,e]
ans=0
for i in range(4):
    if l[i+1]-l[i]>k:
        ans+=1
if ans>0:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
k =int(input())
if (e-a)>k:
  print(':(')
else:
  print('Yey！')

Submission status: Wrong Answer

Solution code:
a =int(input())
b =int(input())
c =int(input())
d =int(input())
e =int(input())
k =int(input())
if (e-a)>k:
  print(':(')
else:
  print('Yey!')

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

l = [INT() for _ in range(5)]
k = INT()

if max(l[1]-l[0], l[2]-l[1], l[3]-l[2], l[4]-l[3]) > k:
	print(":(")
else:
	print("Yay!")

Submission status: Wrong Answer

Solution code:
import itertools

l = list()
for a in range(0, 5):
    l.append(int(input()))

k = int(input())

com = list(itertools.combinations(l, 2))

for a in range(0, len(com)):
    com[a] = list(com[a])
    com[a] = abs(com[a][0] - com[a][1])

ans = 'Yay!'

for a in com:
    if a > k:
        ans = ': ('
        break

print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if abs(a - e) >= k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
data = [int(input()) for i in range(5)]
k = int(input())
flag = True
for i in range(len(data)-1):
    for j in range(i, len(data)):
        if data[j]-data[i] > k:
            flag = False

if flag:
    print("Yay")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
l=[int(input()) for i in range(5)]
k=int(input())

if (max(l)-min(l)) > 0:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
l=[int(input()) for i in range(5)]
k=int(input())

cnt=0
for i in range(1,len(l)):
    if l[i]-l[i-1] > k:
        cnt +=1

if cnt > 0:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
a = list(int(input()) for _  in range(5))
k = int(input())
ans='Yay!'
for i in a:
  for j in range(len(a)):
    if a[j] - i >18:
      ans = ':('
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
for i in range(4):
    for j in range(i+1, 5):
        if abs(i-j) > a[5]:
            print(":(")
            exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
# A
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a >= k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
l = []
for i in range(5):
    x = int(input())
    l.append(x)
l = sorted(l)
s = int(input())
if l[-1]-l[0]<s:
    print("Yay!")
else:print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

max_distance = e - a
can_communicate = max_distance > k

answer = ':(' if not can_communicate else 'Yay!'
print(answer)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = ":("
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] <= abs(a - aaa[i]):
        ans = "Yay"
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= abs(a - aaa[i]):
        ans = ":("
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] < abs(a - aaa[i]):
        ans = ":("
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] <= abs(a - aaa[i]):
        ans = ":("
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] <= a - aaa[i]:
        ans = ":("
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= a - aaa[i]:
        ans = ":("
        break
    a = aaa[i]
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] <= a - aaa[i]:
        ans = ":("
        break
print(ans)

Submission status: Wrong Answer

Solution code:
aaa = [int(input()) for i in range(6)]
 
ans = "Yay!"
 
a = aaa[0]
for i in range(1,5):
    if aaa[5] >= a - aaa[i]:
        ans = ":("
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
d = [a,b,c,d,e]
for i in range(4):
    if d[i+1]-d[i] > k:
        print(":(")
        exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
d = [a,b,c,d,e]
for i in range(4):
    if d[i+1]-d[i] > k:
        print(":(")
        exit()
print("Yey!")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if (b-a) > k or (c-b) > k or (d-c) > k or (e-d) > k:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
time = [int(input()) for _ in range(5)]

import math
ans = 0
minmod = 10
for i in range(5):
  if time[i]%10!=0:
    minmod = min(minmod,time[i]%10)
  else:
    minmod = min(minmod,10)
  ans += math.ceil(time[i]/10)*10

ans -= (10-minmod)
print(ans)

Submission status: Wrong Answer

Solution code:
x = []
count = 0
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
x.append(int(input()))
k = int(input())
for i in range(len(x)):
     for j in range(i, len(x)):
          if abs(x[i] - x[j]) < k:
               count += 0
          else:
               count += 1
if count == 0:
     print('Yay!')
else:
     print(':(')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

v=b-a
w=c-b
x=d-c
y=e-d

z=max(max(v,w),max(x,y))

if z >k:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

v=b-a
w=c-b
x=d-c
y=e-d

z=max(max(v,w),max(x,y))

if z >k:
  print(':')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
numbers = []
for _ in range(5):
    numbers.append(int(input()))
predicted_value = "Yay!"
k_distance = numbers[-1]
antenas = numbers[:-1]
antenas.sort()
if antenas[-1] - antenas[0] > k_distance:
    predicted_value = ":("
print(predicted_value)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if 0 < a <= 123:
    if 0 < b <= 123:
        if 0 <c <= 123:
            if 0 < d <= 123:
                if 0 < e <= 123:
                    if 0 < k <= 123:
                        if a < b:
                            if b < c:
                                if c < d:
                                    if d < e:
                                        ab = b - a
                                        ac = c - a
                                        ad = d - a
                                        ae = e - a
                                        bc = c - b
                                        bd = d - b
                                        be = e - b
                                        cd = d - c
                                        ce = e - c
                                        de = e - d

                                        lista = [ab, ac, ad, ae, bc, bd, be, cd, ce, de]
                                        x = max(lista)

                        if x <= 15:
                            print("Yay!")
                        else:
                            print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if 0 <= a <= 123:
    if 0 <= b <= 123:
        if 0 <= c <= 123:
            if 0 <= d <= 123:
                if 0 <= e <= 123:
                    if 0 <= k <= 123:
                        if a < b:
                            if b < c:
                                if c < d:
                                    if d < e:
                                        ab = b - a
                                        ac = c - a
                                        ad = d - a
                                        ae = e - a
                                        bc = c - b
                                        bd = d - b
                                        be = e - b
                                        cd = d - c
                                        ce = e - c
                                        de = e - d

                                        lista = [ab, ac, ad, ae, bc, bd, be, cd, ce, de]
                                        x = max(lista)

                        if x <= 15:
                            print("Yay!")
                        else:
                            print(":(")

Submission status: Wrong Answer

Solution code:
u = []
for i in range(6):
    u.append(int(input()))
k = u[-1]
soma = 0
for i in range(4):
    soma += u[i+1]-u[i]
if soma<= k:
    print("Yay!")
else:
    print(": (")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if a < b :
    if b < c :
        if c < d:
            if d < e:
                ab = b-a
                ac = c-a
                ad = d-a
                ae = e-a
                bc = c-b
                bd = d-b
                be = e-b
                cd = d-c
                ce = e-c
                de = e-d

                lista = [ab,ac,ad,ae,bc,bd,be,cd,ce,de]
                x = max(lista)

if x <= 15:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = int(input()), int(input()), int(input()), int(input()), int(input()), int(input())
distancies = {
    "a_b": b - a,
    "a_c": c - a,
    "a_d": d - a,
    "a_e": e - a,
    "b_c": c - b,
    "b_d": d - b,
    "b_e": e - b,
    "c_d": d - c,
    "c_e": e - c,
    "d_e": e - d
}
print("Yay!") if all(v < k for v in distancies.values()) else print(":(")

Submission status: Wrong Answer

Solution code:
inp = []
for n in range(5):
    inp.append(int(input()))
k = int(input())

if(inp[-1]-inp[0]<k):
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if b - a > k or c - b > k or d - c > k or e - d > k:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
p = []
for i in range(5):
    p.append(int(input()))

k = int(input())
for i in range(5):
    for j in range(4-i):
        if p[i] - p[j] >k:
            print(":(")
            exit()
print("Yay!")

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k=[int(input())for _ in range(6)]
if e-a >= k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k=[int(input())for _ in range(6)]
if e-a >= k:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
a=[0]*5
a[0]=int(input())
a[1]=int(input())
a[2]=int(input())
a[3]=int(input())
a[4]=int(input())
k=int(input())
if k>a[4]-a[0]:
  print('Yay!')
  exit()
print(':(')

Submission status: Wrong Answer

Solution code:

n = int(input())
l = []
for _ in range(5):
    l.append(int(input()))

x = min(l)
print((int(n/x)+1) + 4)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
if e - a <= k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:

line=[]

for i in range(5):
    line.append( int(input()))

k = int(input())



out = "Yay!"

for i in range(5):
    for j in range(4-i):
        tmp = line[i] - line[j+1]
        print(tmp)

        if abs(tmp) > k:
            out = ":("

    if out == ":(":
        break

print(out)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
if a[4]-a[0]>18:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
l = max(b - a, c - b, d - c, e - d)
if l < k:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if k > (b-a) and k > (c-b) and k > (d-c) and k > (e-d) and k > ((b-a) + (c-b) + (d-c) + (e-d)) :
    print("Yay!")
else :
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if k > (b-a) and k > (c-b) and k > (d-c) and k > (e-d) :
    print("Yay!")
else :
    print(":(")

Submission status: Wrong Answer

Solution code:
line2 = []
for i in range(5):
    line = int(input())
    line2.append(line)
long = int(input())
if line2[4] - line2[0] <= long:
    print("Yey!")
else:
    print(": (")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
lis=[abs(a-b),abs(a-c),abs(a-d),abs(a-e),abs(b-c),abs(b-d),abs(b-e),abs(c-d),abs(c-e),abs(d-e)]
lis2=sorted(lis)
print(lis2)
if lis2[-1]<=k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
lis=[abs(a-b),abs(a-c),abs(a-d),abs(a-e),abs(b-c),abs(b-d),abs(b-e),abs(c-d),abs(c-e),abs(d-e)]
lis2=sorted(lis)
print(lis2)
if lis2[-1]<k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ in range(5)]
k = int(input())
print('Yay!' if max(l) - min(l) < k else ':(')

Submission status: Wrong Answer

Solution code:
List = [int(input()) for i in range(5)]
k = int(input())
ans = 0

List = sorted(List)
for i in range(4):
  if List[i+1] - List[i] > k:
    ans = 1

print(":(" if ans == 1 else "Yay!")

Submission status: Wrong Answer

Solution code:
a = input()
b = input()
c = input()
d = input()
e = input()
k = input()
if int(k) <= int(e)- int(a):
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
flag = 1
for i in range(5):
  if a[i+1]-a[i]>a[5]:
    flag = 0
if flag:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
n = [int(input()) for i in range(5)]
k = int(input())

if max(n) - min(n) > 15:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
A=[int(input()) for _ in range(5)]
print("Yay!" if (A[-1]-A[0])>int(input()) else ":(")

Submission status: Wrong Answer

Solution code:
l = [int(input()) for i in range(6)]
cnt = 0
for i in range(4):
    if l[i + 1] - l[i] <= l[5]:
        cnt += 1
if cnt == 4:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

if e - a < k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

number_1 =  [b, c, d, e]
number_2 = [c, d, e]
number_3 = [d, e]
for select in number_1:
    if abs(a - select) < k:
        for select in number_2:
            if abs(b - select) < k:
                for select in number_3:
                    if abs(c - select) < k:
                        if abs(d - e) < k:
                            pass
                        else:
                            print(":(")
                            break
                    else:
                            print(":(")
                            break
            else:
                    print(":(")
                    break
        print("Yay!")
        break
    else:
        print(":(")
        break

Submission status: Wrong Answer

Solution code:
import sys

*x, k = map(int, sys.stdin.read().split())
x.sort()

def main():
    ans = 'yay!' if x[-1] - x[0] <= k else ':('
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

if b-a and c-b and d-c and e-d <= k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
def main():
  #n = int(input())
  #s = input()
  #s = input().split()
  #a,b = list(map(int,input().split()))
  a = [list(map(int,input().split())) for i in range(6)]
  #a = [int(input()) for i in range(6)]
  ans = 0
  
  
  if a[4] > a[5]:
    print(":(")
  else:
    print("Yay!")
  
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
def main():
  #n = int(input())
  #s = input()
  #s = input().split()
  #a,b = list(map(int,input().split()))
  a = [list(map(int,input().split())) for i in range(6)]
  #a = [int(input()) for i in range(6)]
  ans = 0
  
  for i in range(5):
     if a[i] > a[5]:
        print(":(")
        exit()
        
  print("Yay!")
  
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
for i in range(4):
  if a[i+1] - a[i] > k:
    print(":(")
    exit()
print("Yay!")