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: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using ull=unsigned long long;
using uint=unsigned int;
using pcc=pair<char,char>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using pdd=pair<double,double>;
using tuplis=pair<ll,pll>;
using tuplis2=pair<pll,ll>;
template<class T> using pq=priority_queue<T,vector<T>,greater<T>>;
const ll LINF=0x1fffffffffffffff;
const ll MOD=1000000007;
const ll MODD=998244353;
const int INF=0x3fffffff;
const double DINF=numeric_limits<double>::infinity();
const vector<pii> four={{-1,0},{0,1},{1,0},{0,-1}};
#define _overload4(_1,_2,_3,_4,name,...) name
#define _overload3(_1,_2,_3,name,...) name
#define _rep1(n) for(ll i=0;i<n;++i)
#define _rep2(i,n) for(ll i=0;i<n;++i)
#define _rep3(i,a,b) for(ll i=a;i<b;++i)
#define _rep4(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) _overload4(__VA_ARGS__,_rep4,_rep3,_rep2,_rep1)(__VA_ARGS__)
#define _rrep1(n) for(ll i=n-1;i>=0;i--)
#define _rrep2(i,n) for(ll i=n-1;i>=0;i--)
#define _rrep3(i,a,b) for(ll i=b-1;i>=a;i--)
#define _rrep4(i,a,b,c) for(ll i=a+(b-a-1)/c*c;i>=a;i-=c)
#define rrep(...) _overload4(__VA_ARGS__,_rrep4,_rrep3,_rrep2,_rrep1)(__VA_ARGS__)
#define each(i,a) for(auto& i:a)
#define sum(...) accumulate(range(__VA_ARGS__),0LL)
#define dsum(...) accumulate(range(__VA_ARGS__),double(0))
#define _range(i) (i).begin(),(i).end()
#define _range2(i,k) (i).begin(),(i).begin()+k
#define _range3(i,a,b) (i).begin()+a,(i).begin()+b
#define range(...) _overload3(__VA_ARGS__,_range3,_range2,_range)(__VA_ARGS__)
#define _rrange(i) (i).rbegin(),(i).rend()
#define _rrange2(i,k) (i).rbegin(),(i).rbegin()+k
#define _rrange3(i,a,b) (i).rbegin()+a,(i).rbegin()+b
#define rrange(...) _overload3(__VA_ARGS__,_rrange3,_rrange2,_rrange)(__VA_ARGS__)
#define elif else if
#define unless(a) if(!(a))
#define mp make_pair
#define mt make_tuple
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define vec(type,name,...) vector<type> name(__VA_ARGS__)
#define VEC(type,name,size) vector<type> name(size);in(name)
#define vv(type,name,h,...) vector<vector<type>>name(h,vector<type>(__VA_ARGS__))
#define VV(type,name,h,...) vector<vector<type>>name(h,vector<type>(__VA_ARGS__));in(name)
#define vvv(type,name,h,w,...) vector<vector<vector<type>>>name(h,vector<vector<type>>(w,vector<type>(__VA_ARGS__)))
__attribute__((constructor)) void SETTINGS(){cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);};
inline constexpr ll gcd(ll a,ll b){if(!a||!b)return 0;if(a<b){ll c=a;a=b;b=c;}while(b){ll c=b;b=a%b;a=c;}return a;}
inline constexpr ll lcm(ll a,ll b){if(!a||!b)return 0;return a*b/gcd(a,b);}
template<class T>inline constexpr T min(vector<T>& v){return *min_element(range(v));}
inline char min(string& v){return *min_element(range(v));}
template<class T>inline constexpr T max(vector<T>& v){return *max_element(range(v));}
inline char max(string& v){return *max_element(range(v));}
inline constexpr ll intpow(const ll&a,const ll&b){if(b==0)return 1;ll ans=intpow(a,b/2);return ans*ans*(b&1?a:1);}
inline constexpr ll modpow(const ll&a,const ll&b,const ll&mod=MOD){if(b==0)return 1;ll ans=modpow(a,b/2,mod);ans=ans*ans%mod;if(b&1)ans=ans*a%mod;return ans;}
template<typename T>
inline constexpr bool update_min(T& mn,const T& cnt){if(mn>cnt){mn=cnt;return 1;}else return 0;}
template<typename T>
inline constexpr bool update_max(T& mx,const T& cnt){if(mx<cnt){mx=cnt;return 1;}else return 0;}
inline void in() {}
template<class T>
istream& operator >> (istream& is, vector<T>& vec);
template<class T,size_t size>
istream& operator >> (istream& is, array<T,size>& vec);
template<class T,class L>
istream& operator >> (istream& is, pair<T,L>& p);
template<class T>
ostream& operator << (ostream& os, vector<T>& vec);
template<class T,class L>
ostream& operator << (ostream& os, pair<T,L>& p);
template<class T>
istream& operator >> (istream& is, vector<T>& vec){for(T& x: vec) is >> x;return is;}
template<class T,class L>
istream& operator >> (istream& is, pair<T,L>& p){is >> p.first;is >> p.second;return is;}
template<class T>
ostream& operator << (ostream& os, vector<T>& vec){os << vec[0];rep(i,1,vec.size()){os << ' ' << vec[i];}return os;}
template<class T>
ostream& operator << (ostream& os, deque<T>& deq){os << deq[0];rep(i,1,deq.size()){os << ' ' << deq[i];}return os;}
template<class T,class L>
ostream& operator << (ostream& os, pair<T,L>& p){os << p.first << " " << p.second;return os;}
template<class T,class L>
pair<T,L> operator + (pair<T,L> a, pair<T,L> b){return {a.first + b.first, a.second + b.second};}
template <class Head, class... Tail>
inline void in(Head&& head,Tail&&... tail){cin>>head;in(move(tail)...);}
template <class T>
inline bool out(T t){cout<<t<<'\n';return 0;}
inline bool out(){cout<<'\n';return 0;}
template <class Head, class... Tail>
inline bool out(Head head,Tail... tail){cout<<head<<' ';out(move(tail)...);return 0;}
template <class T>
inline void err(T t){cerr<<t<<'\n';}
inline void err(){cerr<<'\n';}
template <class Head, class... Tail>
inline void err(Head head,Tail... tail){cerr<<head<<' ';out(move(tail)...);}
inline bool yes(bool i){return out(i?"yes":"no");}
inline bool Yes(bool i){return out(i?"Yes":"No");}
inline bool YES(bool i){return out(i?"YES":"NO");}
inline bool Yay(bool i){return out(i?"Yay!":":(");}
inline bool Possible(bool i){return out(i?"Possible":"Impossible");}
inline bool POSSIBLE(bool i){return out(i?"POSSIBLE":"IMPOSSIBLE");}
inline void Case(ll i){cout<<"Case #"<<i<<": ";}



signed main(){
    LL(a,b,c,d,e,k);
    Yay(e-a<=k);
}

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input = []
array = []
input = [int(input()) for i in range(6)]
array = input[:5]
k = input[5] 
size = len(array)
for i in range(size):
	if (array[size - i] - array[0] > k):
      print(':(')
      break
    if (i < 3):
      if (array[size - i] - array[1] > k):
      	print(':(')
        break
    if (i < 2):
      if (array[size - i] - array[2] > k):
      	print(':(')
        break
	if (i < 1):
      if (array[size - i] - array[3] > k):
        print(':(')
        break
    if (i == 4):
      print('Yay')

Submission status: Runtime Error

Solution code:
input = []
array = []
input = [int(input() for i in range(6)]
array = input[:5]
k = input[5] 
size = len(array)
for i in range(size):
	if (array[size - i] - array[0] > k):
      print(':(')
      break
    if (i < 3):
      if (array[size - i] - array[1] > k):
      	print(':(')
        break
    if (i < 2):
      if (array[size - i] - array[2] > k):
      	print(':(')
        break
	if (i < 1):
      if (array[size - i] - array[3] > k):
        print(':(')
        break
    if (i == 4):
      print('Yay')

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
l = [e, d, c, b, a]
de = e - d
ce = e - c
cd = d - c
be = e - b
bd = d - b
bc = c - b
ae = e - a
ad = d - a
ac = c - a
ab = b - a
distance = [ab, ac, ad, ae, bc, bd,be, cd, ce, de]
output = []
ok = 'Yay!'
bad = ':('
for i in distance:
    if i >= k:
        output.append(bad)
    else i < k:
        output.append(ok)
if bad in output:
    print(bad)
elif ok in output:
    print(ok)

Submission status: Runtime Error

Solution code:
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e)
data = list(itertools.combinations(seq,2))
print(data)
result = 0
for i in range(len(data)):
    if data[i][0] < data[i][1]:
        if data[i][1] - data[i][0] < k:
        result +=1
    else:
        if data[i][0] - data[i][1] < k:
        result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
import numpy as np
main():
  n=6
  a=[int(input()) for i in range(n)]
  dero=np.zeros((25,2))
  for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
  frag=0
  for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
  if frag==0:
    print("Yay!")
  else:
    print(":(")

Submission status: Runtime Error

Solution code:
input = []
array = []
for i in input():
  input.append(int(i))
array = input[:5]
k = input[5] 
size = len(array)
for i in range(size):
	if (array[size - i] - array[0] > k):
      print(':(')
      break
    if (i < 3):
      if (array[size - i] - array[1] > k):
      	print(':(')
        break
    if (i < 2):
      if (array[size - i] - array[2] > k):
      	print(':(')
        break
	if (i < 1):
      if (array[size - i] - array[3] > k):
        print(':(')
        break
    if (i == 4):
      print('Yay')

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
list1=[A,B,C,D,E]
sum=0
for item in list1:
  if(item%10==0):
    sum+=item
  else:
    sum=sum+item+(10-item%10)
print(sum

Submission status: Runtime Error

Solution code:
raw = raw_input().split()                                                                              
a = int(raw[0])                                                                                        
b = int(raw[1])                                                                                        
c = int(raw[2])                                                                                        
d = int(raw[3])                                                                                        
e = int(raw[4])                                                                                        
k = int(raw[5])                                                                                        
                                                                                                       
if b - a <= k or c - b <= k or d - c <= k or d - e <= k:                                               
    print 'Yay!'                                                                                       
else:                                                                                                  
    print ':('

Submission status: Runtime Error

Solution code:
raw = raw_input().split()                                                                              |a = int(raw[0])                                                                                       
a = int(raw[0])                                                                                        |b = int(raw[1])                                                                                       
b = int(raw[1])                                                                                        |c = int(raw[2])                                                                                       
c = int(raw[2])                                                                                        |k = int(raw[3])                                                                                       
d = int(raw[3])                                                                                        |                                                                                                      
e = int(raw[4])                                                                                        |m = 1000000000000000000                                                                               
k = int(raw[5])                                                                                        |                                                                                                      
                                                                                                       |# a -b                                                                                                
if b - a <= k or c - b <= k or d - c <= k or d - e <= k:                                               |# b+c - (a+c) = b - a                                                                                 
    print 'Yay!'                                                                                       |def recursion(a,b,c, k, i):                                                                           
else:                                                                                                  |    if i < k:                                                                                         
    print ':('

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
list1=[A,B,C,D,E]
sum=0
for item in list1:
  if(w%10==0):
    sum+=w
  else:
    sum=sum+(10-w%10)
print(sum)

Submission status: Runtime Error

Solution code:
n=6
a=[int(input()) for i in range(n)]
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
frag=0
for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
if frag==0:
  print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
q = int(input())
 
f = [a,b,c,d,e]

 
g=f[4]-f[3]
h=f[4]-f[2]
i=f[4]-f[1]
j=f[4]-f[0]
k=f[3]-f[2]
l=f[3]-f[1]
m=f[3]-f[0]
n=f[2]-f[1]
o=f[2]-f[0]
p=f[1]-f[0]

 
if g<q and h<q and i<q and j<q and k<q and l<q and m<q and m<q and n<q and o<q p<q:
  print("Yay!")
 
else:
  print(":(")

Submission status: Runtime Error

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 and c - a <= k and d - a <= k and e - a <= k and d - b <= k and e - b <= k and e - c <= k:
    print("Yay!
")
else:
    print(": (")

Submission status: Runtime Error

Solution code:
for i in range(6):
  box[i]=int(input())
flag=0
for i in range(4):
  if (box[i]-box[i+1]) > box[5]:
    flag = 1 #直接通信ができない
  	break
if flag==1:
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
x = list(map(int, input()))
if x[4] - x[0] < x[-1]:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
x = list(map(int, input().split()))
if x[4] - x[0] < x[-1]:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
import sys

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

flag = 0

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

Submission status: Runtime Error

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(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: Runtime Error

Solution code:
import numpy as np
a=list(input())
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
frag=0
for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
if frag==0:
  print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
import sys

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

for i in range(5):
    for j in range(i + 1, 5):
        distance = spots[j] - spots[i]
        if (distance > k):
            print(":(")
            sys.exit(1)

print("Yay!")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import itertools
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
seq = (a,b,c,d,e,f)
data = list(itertools.combinations(seq,2))
result = 0
for i in range(len(data)):
    if data[i][0] - data[i][1] < k:
        result +=1
if result == len(data):
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
import sys

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

flag = 0

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

Submission status: Runtime Error

Solution code:
import numpy as np
N = input()
a = []
for i in range(N):
    a.append(input())
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]

Submission status: Runtime Error

Solution code:
um = []
j = ''
for i in range(5):
    num.append(int(input()))
ans = int(input())
for i, b in enumerate(num):
    for a in num[i+1:]:
        if a - b > ans:
            print(':(')
            j = ':('
            break
if not ':(' in j:
    print('Yay!')

Submission status: Runtime Error

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

f = [a,b,c,d,e]
f.sort()

g = f[1]-f[0]
h = f[2]-f[0]
i = f[3]-f[0]
j = f[4]-f[0]
k = f[2]-f[1]
l = f[3]-f[1]
m = f[4]-f[1]
n = f[3]-f[2]
o = f[4]-f[2]
p = f[4]-f[3]

if g<q and h<q and i<q and j<q and k<q and l<q and m<q and m<q and n<q and o<q p<q:
  print("Yay!")

else:
  print(":(")

Submission status: Runtime Error

Solution code:
li = input("lkdfkgkfg").split()
t = 0
s = int(li.pop(5))
for i in li:
    for k in li:
        if int(k) - int(i) >= s:
            t = 1

if t == 0:
    print("Yay!")
else:
    print(":(")

while True:
    s += 1

Submission status: Runtime Error

Solution code:
#coding:utf-8

li = input().split("")
t = 0
s = int(li.pop(5))
for i in li:
    for k in li:
        if int(k) - int(i) >= s:
            t = 1

if t == 0:
    print("Yay!")
else:
    print(":(")

while True:
    s += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

for i in range(0, 4, 1):
    dis = list[i+1] - list[i]
    if list[dis]<list[5]:
        if i == 3:
            print("Yay!")
        continue
    else:
        print(":(")
        break

Submission status: Runtime Error

Solution code:
import numpy as np
N = input()
a = []
for i in range(N):
    a.append(input())
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=a[j]-a[i]
    dero[i*5+j][1]=a[5]
frag=0
for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
    print(dero[i][0])
if frag==0:
  print(":(")

Submission status: Runtime Error

Solution code:
import sys

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

coord = [a, b, c, d, e]
for i in range(len(coord)):
    for j in range(len(coord)):
        if abs(coord[i] - coord[j]) > k :
            print(":(")
            sys.exit(1)
print("Yay!")

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
temp = 0
if i[4] - i[3] > i[5]:
  temp += 1
if i[3] - i[2] > i[4]:
  temp += 1
if i[2] - i[1] > i[4]:
  temp += 1  
if i[1] - i[0] > i[4]:
  temp += 1  
if temp != 0:
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
array = []
for i in input():
  array.append(i)

size = len(array)

for i in range(size):
	if (array[size - i] - array[0] >= 18):
      print(':(')
    if (i < 3):
      if (array[size - i] - array[1] >= 18):
      	print(':(')
      else:
        print('Yay!')
    if (i < 2):
      if (array[size - i] - array[1] >= 18):
      	print(':(')
      else:
        print('Yay!')
	if (i < 1):
      if (array[size - i] - array[1] >= 18):
      	print(':(')
      else:
        print('Yay!')

Submission status: Runtime Error

Solution code:

args = {}

l = ["a", "b", "c", "d", "e", "k"]
for i in range(len(l)):
    args[l[i]] = int(input())


# 5-4
# 5-3
# 5-2
# 5-1

# 4-3
# 4-2
# 4-1

# 3-2
# 3-1

# 2-1

for i in range(len(l) - 1):
    j = 5-i
    for m in range(len(l) - 2):
        n = j - (m+1)
        if n <= 0:
            continue
        if l[j] - l[n] > l["k"]:
            print(':(')
            exit()
print("Yay!")

Submission status: Runtime Error

Solution code:
import numpy as np
# points = np.array([0, 1, 2, 3, 4])
points = np.array([input() for _ in range(5)])
thr = input()
diff = max(points[1:] - points[:4])
if diff <= thr:
    print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
temp = 0
if i[4] - i[3] > i[5]:
  temp += 1
if i[3] - i[2] > i[5]:
  temp += 1
if i[2] - i[1] > i[5]:
  temp += 1  
if i[1] - i[0] > i[5]:
  temp += 1  
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

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

for i in range(5):
  for j in range(i, 5):
    if abs(L[i] - L[i+j+1]) > k:
      print(":(")
      break
  else:
    continue
  break
else:
  print("Yay!")

Submission status: Runtime Error

Solution code:
#coding:utf-8

li = input("lkdfkgkfg").split()
t = 0
s = int(li.pop(5))
for i in li:
    for k in li:
        if int(k) - int(i) >= s:
            t = 1

if t == 0:
    print("Yay!")
else:
    print(":(")

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
f=[b-a,c-b,d-c,e-d]
 
if(f[0]>k or f[1]>k or f[2]>kor f[3]>k):
  print(':(')
elif((f[0]+f[1])>k or (f[1]+f[2])>k or (f[2]+f[3])>k):
  print(':(')
elif((f[0]+f[1]+f[2])>k or(f[1]+f[2]+f[3])>k):
  print(':(')
elif(e-a)>k:
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(5)]
temp = 0
for j in range(len(i)-1):
  for k in range(j-1):
    if i[j] - i[k] > i[5]:
      temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

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: Runtime Error

Solution code:
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())
arr = [a,b,c,d,e]
bool = True

for i in range(len(arr)):
  for j in range(len(arr)):
    if i != j && abs(arr[i] - arr[j]) > k:
      bool = False
      break;
      
if bool:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
f=[b-a,c-b,d-c,e-d]
 
if((f[0]>k) or (f[1]>k) or (f[2]>k)or (f[3]>k)):
  print(':(')
elif(((f[0]+f[1])>k)or ((f[1]+f[2])>k)or ((f[2]+f[3])>k)):
  print(':(')
elif(((f[0]+f[1]+f[2])>k) or((f[1]+f[2]+f[3])>k)):
  print(':(')
elif((e-a)>k):
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
a, b, c, d, e, f = map(int, input().split)

flag = 0

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

Submission status: Runtime Error

Solution code:
i = [int(input()) for i in range(3)]
temp = 0
if i[1] - i[0] > i[5]:
  temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
f=[b-a,c-b,d-c,e-d]

if((f[0]>k) or (f[1]>k) or (f[2]>k)or (f[3]>k)):
  print(':(')
else if(((f[0]+f[1])>k)or ((f[1]+f[2])>k)or ((f[2]+f[3])>k)):
  print(':(')
else if(((f[0]+f[1]+f[2])>k) or((f[1]+f[2]+f[3])>k)):
  print(':(')
else if((e-a)>k):
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = [input() for i in range(3)]
temp = 0
if int(s[1])-int(s[0]) > int(s[5]):
  temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
import numpy as np

unchi=input()
dero=np.zeros((25,2))
for i in range(5):
  for j in range (5):
    dero[i*5+j][0]=unchi[j]-unchi[i]
    dero[i*5+j][1]=unchi[5]
frag=0
for i in range(25):
  if dero[i][0]>dero[i][1]:
    frag=1
    print(dero[i][0])
if frag==0:
  print(":(")

Submission status: Runtime Error

Solution code:
# coding: utf-8
a,b,c,d,e,k=map(int,input())
if e-a>k:
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
s = [input() for i in range(3)]
temp = 0
for i in range(len(s)-1):
  for j in range(i):
    if int(s[i])-int(s[j]) > int(s[5]):
      temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
for i in range(6):
    a.append(int(input()))

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
c[0]=b-a
c[1]=c-b
c[2]=d-c
c[3]=e-d
if((c[0]>k) or (c[1]>k) or (c[2]>k)or (c[3]>k)):
  print(':(')
else if(((c[0]+c[1])>k)or ((c[1]+c[2])>k)or ((c[2]+c[3])>k)):
  print(':(')
else if(((c[0]+c[1]+c[2])>k) or((c[1]+c[2]+c[3])>k)):
  print(':(')
else if((e-a)>k):
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

Solution code:
num_list = []
while True:
    element = input()
    if element is None:
        break

    if element == '':
        break

    num_list.append(int(element))

limit = num_list[-1]

ans_string = "Yay!"
# for i in range(len(num_list) - 1):
#     print(num_list[i + 1] - num_list[i])
#     if num_list[i + 1] - num_list[i] > limit:
#         ans_string = ":("

for i in range(len(num_list) - 1):
    for j in range(i, len(num_list) - 1):
        if num_list[j] - num_list[i] > limit:
            ans_string = ":("

print(ans_string)

Submission status: Runtime Error

Solution code:
s = [int(input()) for i in range(3)]
temp = 0
for i in range(len(s)-1):
  for j in range(i):
    if s[i]-s[j] > s[5]:
      temp += 1
if temp == 0:
  print('Yay!')
else:
  print(':(')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
# コンテナの座標（西→東）
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

# 電波が届く最大の距離
k = int(input())

# 最大の距離(=e-e)
int max_dis = e -a
        
# 出力
if max_dis < k:
  print('Yay!')
else:
    print(':(')

Submission status: Runtime Error

Solution code:
import numpy as np

antennas = []

for _ in range(5):
  antennas.append(int(input()))

k = int(input())

available = True

for send in range(5):
  if not available:
    break
  for receive in range(5):
    if antennas[receive] - antennas[send] > k:
      available = False
      break

if available:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

Solution code:
str1 = input()
str2 = input()
str3 = input()
str4 = input()
str5 = input()
str6 = input()

flag = 0

if((str5-str4)>str6 or (str4-str3)>str6 or (str3-str2)>str6 or (str2-str1)>str6):
  print(':(')
else:
  print('Yay!')

Submission status: Runtime Error

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

for i in s:
    for j in s:
        if (i-j)**2 > k**2:
            print(":(")
            count+=1
	    break

if count == 0:
    print("Yay!")

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
inp=[a,b,c,d,e]
i=0;
j=0;
kek=true
while i<5:
  j=i
  while j<5:
    if inp[j]-inp[i]>k:
      kek=false
      
if kek:
  print "Yay!"
else:
    print ":("

Submission status: Runtime Error

Solution code:
#include<stdio.h>
int main(){
  int array[5];
  int i,k,p,j;
  p=0;
  for(i=0;i<5;i++){
    scanf("%d",&array[i]);
  }
  scanf("%d",&k);
  for(i=0;i<5;i++){
    for(j=i;j<5;j++){
      if(k<array[j]-array[i]){
        p+=1;
      }
    }
  }
  if(p==0){
    printf("Yay!\n");
  }else{
    printf(":(\n");
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
A=[]
for i in range(6):
  A.append(int(input()))
X=A[4]-A[0]
if X=<A[5]:
  print("Yay!")
else:
  print(":(")

Submission status: Runtime Error

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

for i in range(4):
	if a[i+1]-a[i]>a[5]:
		print(':(')
		return

print('Yay!')

Submission status: Runtime Error

Solution code:
a,b,c,d,e,k=map(int, input().split())
A =[a,b,c,d,e]
A.sort(reverse=True)
K = []
for i in range(len(A)-1):
  for j in range(i+1,len(A)):
    K.append(A[i]-A[j])
Max = 0
for n in range(len(K)):
  Max = max(Max,K[n])
if (Max <= k):
  print("Yay!")
else:
  print(":(")