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 = [int(input()) for x in range(5)]
k = int(input())

flg = True

for i, x in enumerate(a):
  for j, y in enumerate(a):
    if i == j:
      continue
      
    flg = flg and abs(y-x) > k
    
print('Yay!' if flg else ":(")

Submission status: Wrong Answer

Solution code:
k=0
l=[]
for i in range(6):
    l.append(int(input()))
for i in range(1,5):
    if l[i]-l[i-1]>l[5]:
        k+=1
        break
if k==0:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
from itertools import combinations
s=[int(input())for _ in[0]*6]
k=s.pop()
r="Yay!"
for i,j in combinations(s,2):
	if j-i>k:
		r=":)";break
print(r)

Submission status: Wrong Answer

Solution code:
S = [int(input()) for _ in range(5)]
k=int(input())
a=max(S)
b=min(S)
if a-b>k:
    print(':(') 
    exit()       
else:
    print('Yey!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[int(input()) for i in range(5)]
k=int(input())
for i in range(4):
    for j in range(i+1,5):
        if abs(a[i]-a[j])>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())
if e - a <= k:
  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())
x = e - a
if x < k:
  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())
x = e - a
if x <= k:
  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())

l = []
l.append(a)
l.append(b)
l.append(c)
l.append(d)
l.append(e)
ans = 0
for i in range(5):
    for j in range(i+1,5):
        if l[j] - l[i] > k :
            ans += 1

if ans > 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 e - a < k:
    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())
if k>=max(b-a,c-b,d-c,e-d):
  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())
if k<max(b-a,c-b,d-c,e-d):
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

for e in antennas[:0:-1]:
    if e == antennas[0]:
        print(':(')
        break
else:
    print('Yay!')

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(":(")
    quit()
print("Yay!")

Submission status: Wrong Answer

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

check = True
for i in range(4):
  if int(antenna[i+1]) - int(antenna[i]) > k:
    check = False
    
print("Yay!" if check else ":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
x=int(input())
ls=[a,b,c,d,e]
if (ls[1]-ls[0])<=x and (ls[2]-ls[1])<=x and (ls[3]-ls[2])<=x and (ls[4]-ls[3])<=x:
  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())
x=int(input())
ls=[a,b,c,d,e]
ls.sort()
if (ls[1]-ls[0])<=x and (ls[2]-ls[1])<=x and (ls[3]-ls[2])<=x and (ls[4]-ls[3])<=x:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    A =[]
    A.append(int(input()))


    A.append(int(input()))

    A.append(int(input()))

    A.append(int(input()))

    A.append(int(input()))

    k = int(input())

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

    print("Yay!")

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
li=[]

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

k=int(input())

li.sort()
print(li)

if li[-1]-li[0]>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())
if(e-a <= k):
    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 ())
if k >= e-a:
  print ('Yey!')
else:
  print (':(')

Submission status: Wrong Answer

Solution code:
x,y=[],[]
t=10
for i in range(5):
    x.append(int(input()))
    y.append(x[i]%10)
    if 0<y[i]<t:
        t=y[i]
    if x[i]%10!=0:
        x[i]=((x[i]//10)+1)*10
    y[i]=x[i]
print(sum(y)+t-10)

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_num = a
min_num = a
if b < min_num:
    min_num = b
if b > max_num:
    max_num = b

if c < min_num:
    min_num = c
if c > max_num:
    max_num = c

if d < min_num:
    min_num = d
if d > max_num:
    max_num = d

if e < min_num:
    min_num = e
if e > max_num:
    max_num = e

if max_num - min_num < k:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

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

print( "No" if (max(a)-min(a))>k else "Yes" )

Submission status: Wrong Answer

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

for i in range(4):
    if a[i] - a[0] > k:
        print(':(')
        exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
ans = 0
a = [0]*6

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

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

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

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
ba = a[1] - a[0]
cb = a[2] - a[1]
dc = a[3] - a[2]
ed = a[4] - a[3]
k = a[5]
if ba > k or cb > k or dc > k or ed > k:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[]
for i in range(6):
  a.append(int(input()))
b=a.pop(5)
a=sorted(a)
if abs(a[0]-a[4])>=b:
  print(':(')
else:
  print('Yay!')

Submission status: Wrong Answer

Solution code:
n=[int(input()) for _ in range(6)];print([':(','Yay'][max(n[:5])-min(n[:5])<=n[5]])

Submission status: Wrong Answer

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

if max(a)-min(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())
if e-a<=k:print("Yey!")
else:print(":(")

Submission status: Wrong Answer

Solution code:
for i in range(5):
    I=list(map(int,input()))
k=int(input())
if max(I)-min(I)<=k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# abc123_a.py
# https://atcoder.jp/contests/abc123/tasks/abc123_a

# ★ WA:2
# in2.txt
# in3.txt

# A - Five Antennas /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# AtCoder 市には、5つのアンテナが一直線上に並んでいます。
# これらは、西から順にアンテナ A,B,C,D,E と名付けられており、それぞれの座標は a,b,c,d,e です。
# 2 つのアンテナ間の距離が k 以下であれば直接通信ができ、k より大きいと直接通信ができません。
# さて、直接 通信ができないアンテナの組が存在するかどうか判定してください。
# ただし、座標 p と座標 q (p<q) のアンテナ間の距離は q−pであるとします。

# 制約
#     a,b,c,d,e,kは 0 以上 123以下の整数
#     a<b<c<d<e

# 入力
# 入力は以下の形式で標準入力から与えられる。
# a
# b
# c
# d
# e
# k


# 出力
# 直接 通信ができないアンテナの組が存在する場合は :(、存在しない場合は Yay! と出力せよ。

# 入力例 1
# 1
# 2
# 4
# 8
# 9
# 15

# 出力例 1
# Yay!

# この場合、直接通信できないアンテナの組は存在しません。なぜなら、
#     (A,B)の距離は 2−1 = 1
#     (A,C)の距離は 4−1 = 3
#     (A,D)の距離は 8−1 = 7
#     (A,E)の距離は 9−1 = 8
#     (B,C)の距離は 4−2 = 2
#     (B,D)の距離は 8−2 = 6
#     (B,E)の距離は 9−2 = 7
#     (C,D)の距離は 8−4 = 4
#     (C,E)の距離は 9−4 = 5
#     (D,E)の距離は 9−8 = 1

# そのように、全てのアンテナ間の距離が 15以下であるからです。
# よって、Yay! と出力すれば正解となります。

# 入力例 2
# 15
# 18
# 26
# 35
# 36
# 18

# 出力例 2
# :(

# この場合、アンテナ A
# と D の距離が 35−15 = 20 となり、18 を超えるため直接通信ができません。
# よって、:( と出力すれば正解となります。 


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # line = lines[0]
    # N = int(lines[0])
    # N, Q = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[1].split()))
    values = list()
    for i in range(5):
        values.append(int(lines[i]))
    # valueses = list()
    # for i in range(Q):
    #     valueses.append(list(map(int, lines[i+1].split())))

    log(f'lines[5]=[{lines[5]}]')

    for i in range(4):
        for j in range(4):
            log(f'values[i]=[{values[i]}], values[j]=[{values[j]}], lines[5]=[{lines[5]}]')
            log(f'abs(values[i] - values[j])=[{abs(values[i] - values[j])}], int(lines[5])=[{int(lines[5])}]')
            if abs(values[i] - values[j]) >= int(lines[5]):
                return [':(']
    return ['Yay!']


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['1', '2', '4', '8', '9', '15']
        lines_export = ['Yay!']
    if pattern == 2:
        lines_input = ['15', '18', '26', '35', '36', '18']
        lines_export = [':(']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(6)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    if FLAG_LOG:
        log(f'lines_input=[{lines_input}]')
        log(f'lines_export=[{lines_export}]')
        log(f'lines_result=[{lines_result}]')
        if lines_result == lines_export:
            log('OK')
        else:
            log('NG')
    finished = time.time()
    duration = finished - started
    log(f'duration=[{duration}]')


# 起動処理
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 e-a<k:print("Yey!")
else:print(":(")

Submission status: Wrong Answer

Solution code:
# abc123_a.py
# https://atcoder.jp/contests/abc123/tasks/abc123_a

# A - Five Antennas /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点: 100点

# 問題文
# AtCoder 市には、5つのアンテナが一直線上に並んでいます。
# これらは、西から順にアンテナ A,B,C,D,E と名付けられており、それぞれの座標は a,b,c,d,e です。
# 2 つのアンテナ間の距離が k 以下であれば直接通信ができ、k より大きいと直接通信ができません。
# さて、直接 通信ができないアンテナの組が存在するかどうか判定してください。
# ただし、座標 p と座標 q (p<q) のアンテナ間の距離は q−pであるとします。

# 制約
#     a,b,c,d,e,kは 0 以上 123以下の整数
#     a<b<c<d<e

# 入力
# 入力は以下の形式で標準入力から与えられる。
# a
# b
# c
# d
# e
# k


# 出力
# 直接 通信ができないアンテナの組が存在する場合は :(、存在しない場合は Yay! と出力せよ。

# 入力例 1
# 1
# 2
# 4
# 8
# 9
# 15

# 出力例 1
# Yay!

# この場合、直接通信できないアンテナの組は存在しません。なぜなら、
#     (A,B)の距離は 2−1 = 1
#     (A,C)の距離は 4−1 = 3
#     (A,D)の距離は 8−1 = 7
#     (A,E)の距離は 9−1 = 8
#     (B,C)の距離は 4−2 = 2
#     (B,D)の距離は 8−2 = 6
#     (B,E)の距離は 9−2 = 7
#     (C,D)の距離は 8−4 = 4
#     (C,E)の距離は 9−4 = 5
#     (D,E)の距離は 9−8 = 1

# そのように、全てのアンテナ間の距離が 15以下であるからです。
# よって、Yay! と出力すれば正解となります。

# 入力例 2
# 15
# 18
# 26
# 35
# 36
# 18

# 出力例 2
# :(

# この場合、アンテナ A
# と D の距離が 35−15 = 20 となり、18 を超えるため直接通信ができません。
# よって、:( と出力すれば正解となります。 


def log(line):
    if False:
        print(line)


def calculation(lines):
    # line = lines[0]
    # N = int(lines[0])
    # N, Q = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[1].split()))
    values = list()
    for i in range(5):
        values.append(int(lines[i]))
    # valueses = list()
    # for i in range(Q):
    #     valueses.append(list(map(int, lines[i+1].split())))

    for i in range(4):
        for j in range(4):
            log(f'values[i]=[{values[i]}], values[j]=[{values[j]}], lines[5]=[{lines[5]}]')
            log(f'abs(values[i] - values[j])=[{abs(values[i] - values[j])}], int(lines[5])=[{int(lines[5])}]')
            if abs(values[i] - values[j]) > int(lines[5]):
                return [':(']
    return ['Yay!']


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['1', '2', '4', '8', '9', '15']
        lines_export = ['Yay!']
    if pattern == 2:
        lines_input = ['15', '18', '26', '35', '36', '18']
        lines_export = [':(']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(6)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
l=[]
for _ in range(5):
    l.append(int(input()))
k = int(input())
print('Yay' if l[-1] - l[0]<=k else ':(')

Submission status: Wrong Answer

Solution code:
import sys
a = [int(input()) for _ in range(6)]

for i in a[1::-1]:
    if i-a[0] > a[-1]:
        print(':(')
        sys.exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
import sys
a = [int(input()) for _ in range(6)]

for i in a[:-1]:
    if i > a[-1]:
        print(':(')
        sys.exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
n = []
ans = 'Yay!'
for i in range(6):
    n.append(int(input()))
for i in range(4):
    for j in range(4):
        if abs(n[i] - n[j]) > n[5]:
            ans = ':('
print(ans)

Submission status: Wrong Answer

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

if a[4]-a[0] < k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
import sys
array = [0,0,0,0,0,0]
for I in range(len(array)):
    array[I] = int(input())
    if not ( 0 <= array[I] <= 123 ):
        sys.exit()
print('Yey!') if (array[4] - array[0]) <= array[-1] 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())

isOK=True

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

Submission status: Wrong Answer

Solution code:
antena = [0]*5
for i in range(5):
  antena[i] = int(input())
  
k = int(input())
 
for i in range(len(antena)):
  if antena[-1]-antena[i]>k:
    print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

li = [a,b,c,d,e]

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


if ans:
    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())

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

Submission status: Wrong Answer

Solution code:
V = []
for i in range(5):
  V.append(int(input()))
               
k = int(input())
               
d = []
for i in range(1,5):
  d.append(V[i]-V[i-1])

if max(d) > k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
V = []
for i in range(5):
  V.append(int(input()))
               
k = int(input())
               
d = []
for i in range(1,5):
  d.append(V[i]-V[i-1])

if max(V) > k:
  print(":(")
else:
  print("Yay!")

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

dist = []
li = [ri() for _ in range(5)]
k = ri()
for i in range(4):
  dist.append(li[i+1] - li[i])
if all([i <= k for i in dist]):
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, k = [int(input()) for i in range(6)]

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

Submission status: Wrong Answer

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

k = int(input())

max_dist = max(antena)
min_dist = min(antena)

l = max_dist - min_dist

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 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:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())

S=a,b,c,d,e

if (max(S)-min(S))<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())

S=a,b,c,d,e

if (max(S)-min(S))<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 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:
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,b,c,d,e,k=[int(input()) for i in range(6)]
print(e-a if e-a<=k else ":(")

Submission status: Wrong Answer

Solution code:
def resolve():
    *recored,K = [int(input()) for i in range(6)]
    flag = True
    for i in range(4):
        for j in range(i+1,4):
            if abs(recored[j]-recored[i])>K:flag=False
    
    if flag:print("Yay!")
    else:print(':(')
resolve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A = []
dist = 0
for i in range(5):
    A.append(int(input()))
    if i > 0:
        dist = max(dist,A[i]-A[i-1])
k = int(input())
if dist >= k:
    print(':(')
else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
A = []
dist = 0
for i in range(5):
    A.append(int(input()))
    if i > 0:
        dist = max(dist,A[i]-A[i-1])
k = int(input())
if dist > 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())
a=(E-A)
if K>a:
    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())
a=abs(A-B)
b=abs(A-C)
c=abs(A-D)
d=abs(A-E)
e=abs(B-C)
f=abs(B-D)
g=abs(B-E)
h=abs(C-D)
i=abs(C-E)
j=abs(D-E)
if K>a and K>b and K>c and K>d and K>e and K>f and K>g and K>h and K>i and K>j:
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
aas = [int(input()) for _ in range(5)]
k = int(input())
for i in range(1,5):
  if aas[i]-aas[i-1]>k:
    print(':(')
    exit()
print('Yay!')

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
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(a-c)>k and abs(a-d)>k and abs(a-e)>k and abs(b-c)>k and abs(b-d)>k and abs(b-e)>k and abs(c-d)>k and abs(c-e)>k and abs(d-e)>k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if a-b>k and a-c>k and a-d>k and a-e>k and b-c>k and b-d>k and b-e>k and c-d>k and c-e>k and d-e>k:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
L=[int(input()) for _ in range(5)]
k=int(input())
if sum(L)<=k*5:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
L=[int(input()) for _ in range(5)]
k=int(input())
if sum(L)<k*5:
  print("Yay!")
else:
  print(":(")

Submission status: Wrong Answer

Solution code:
a=[int(input()) for i in range(5)]
k=int(input())
x=max(a)-min(a)
if x>=k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,k = map(int,open(0).read().split())

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

Submission status: Wrong Answer

Solution code:
mn, mx = float('inf'), -float('inf')
for i in range(5):
    a = int(input())
    mn = min(mn, a)
    mx = max(mx, a)
k = int(input())
if mx - mn < k:
    print(":(")
else:
    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())

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(5):
        if i != j:
            #print(dist)
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yey!')
else:
    print(':(')

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())

ant = [a,b,c,d,e]
flg = True
for i in range(5):
    for j in range(i,5):
        if i != j:
            dist = abs(ant[i]-ant[j])
            if dist > k:
                flg = False
                break
if flg:
    print('Yey!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
def main():
    a = [int(input()) for _ in range(6)]
    k = a[5]

    for i in range(5):
        for j in range(i+1,5):
            if (a[j] - a[i]) < k:
                continue
            else:
                return ':('

    return 'Yay!'

print(main())

Submission status: Wrong Answer

Solution code:
v=list(map(int,open(0).read().split()))
print(":("if v[5]<v[4]-v[0]else"Yay")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
flag = True
for i in range(4):
  if k < abs(a[i+1] - a[i]):
    flag = False
    break
print('Yay!' if flag else ':(')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(5)]
k = int(input())
flag = True
for i in range(4):
  if k < a[i+1] - a[i]:
    flag = False
    break
print('Yay!' if flag else ':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
l=[]
f=0
for i in range(5):
    z=int(input())
    l.append(z)
k=int(input())
for i in range(4):
    for j in range(1,5):
        if math.fabs(l[i]-l[j])>=k:
            f=1
            break
if f==1:
    print(":(")
else:
    print("Yay!")

Submission status: Wrong Answer

Solution code:
l=[]
f=0
for i in range(5):
    z=int(input())
    l.append(z)
k=int(input())
for i in range(4):
    for j in range(1,5):
        if l[j]-l[i]>=k:
            f=1
            break
if f==1:
    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())

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

if x <= k and y <= k and z <= k and w <= 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())

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

if x <= k or y <= k or z <= k or w <= k:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
import sys
a=list(map(int,open(0).read().split()))
for i in range(5):
  for j in range(5):
    if i==j:
      continue
    elif abs(a[i]-a[j])>a[5]:
      print(':(')
      sys.exit()
else:
  print('Yey!')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
l = [int(input()) for _ 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:
l = [int(input()) for _ 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=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())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
if k > e-a and k > e-b and k > e-c and k > e-d and k > d-c and k > d-b and k > d-a and k > c-b and k > c-a and k > b-a:
  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 > 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 > e-a and k > e-b and k > e-c and k > 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 > e-a:
  print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
ans = 'Yay!'
for i in range(4):
  for j in range(4):
    if(a[j] - a[i] > a[5]):
      ans = ':('
      exit()
      
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
ans = 'Yay!'
for i in range(4):
  for j in range(4):
    if(a[j] - a[i] > a[5]):
      ans = ':('
      
print(ans)