Problem:


Score: 100 points

Problem Statement

E869120's and square1001's 16-th birthday is coming soon.

Takahashi from AtCoder Kingdom gave them a round cake cut into 16 equal fan-shaped pieces.

E869120 and square1001 were just about to eat A and B of those pieces, respectively,

when they found a note attached to the cake saying that "the same person should not take two adjacent pieces of cake".

Can both of them obey the instruction in the note and take desired numbers of pieces of cake?

Constraints

A and B are integers between 1 and 16 (inclusive).

A+B is at most 16.

Input

Input is given from Standard Input in the following format:

A B

Output

If both E869120 and square1001 can obey the instruction in the note and take desired numbers of pieces of cake, print Yay!; otherwise, print :(.

Sample Input 1

5 4

Sample Output 1

Yay!

Both of them can take desired number of pieces as follows:

Sample Input 2

8 8

Sample Output 2

Yay!

Both of them can take desired number of pieces as follows:

Sample Input 3

11 4

Sample Output 3

:(

In this case, there is no way for them to take desired number of pieces, unfortunately.



Sample input:
5 4


Sample output:
Yay!

Submission status: Accepted

Solution code:
# coding: utf-8

AGE = 16

a, b = [int(i) for i in input().split()]

print('Yay!' if a <= AGE / 2 and b <= AGE / 2 else ':(')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a >= 9) or (b >= 9) :
    print(":(")
else :
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
A, B = map(int, input().split())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8
a, b = map(int, input().split())
if a > 8 or b > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if A <= 8 and B <= 8:
    print("Yay!")
if A > 8 or B > 8:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split(" "))
if a <= 8 and b <= 8:
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

Solution code:
num = input()

num = num.split(" ")

for i in range(len(num)-1):
    if int(num[i]) <= 8 and int(num[i+1]) <= 8:
        print("Yay!")

    else:
        print(":(")

Submission status: Accepted

Solution code:
ab = map(int, input().split())
print("Yay!" if all([(lambda x: x <= 8)(v) for v in ab]) else ":(")

Submission status: Accepted

Solution code:
a, b = (int(i) for i in input().split())
if a > 8 or b > 8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a > 8 or b > 8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print('Yay!' if a<=8 and b <= 8 else ':(')

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a, b = map(int, input().split())
    if a <= 8 and b <= 8:
        print("Yay!")
    else:
        print(":(")

Submission status: Accepted

Solution code:
A,B=[int(i) for i in input().split()]

if A<9 and B<9:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if A >8 or B > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
print("Yay!" if max(list(map(int, input().split())))<9 else ":(")

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if a<=8 and b<=8:
    print("Yay!")
else:print(":(")

Submission status: Accepted

Solution code:
#coding:utf-8

A,B = list(map(int, input().split()))

if A > 8 or B > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
a,b=input().split()
a=int(a)
b=int(b)

if a>8 or b>8:
	print(":(")
else:
	print("Yay!")

Submission status: Accepted

Solution code:
A, B = [int(item) for item in input().split()]

if A > 8 or B > 8:
    print(":(")
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A, B=input().split()
A=int(A)
B=int(B)
if A < 9 and B< 9:
   print("Yay!")
else:
   print(":(")

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
if A<9 and B<9:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
s=input();print(['Yay!',':('][len(s)>3or'9'in s])

Submission status: Accepted

Solution code:
s=input();print([':(','Yay!'][len(s)<4*('9'not in s)])

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split())
if a < 9 and b < 9:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a < 9 and b < 9 :
	print("Yay!")
else :
	print(":(")

Submission status: Accepted

Solution code:
ALL = input().split()
A = int(ALL[0])
B = int(ALL[1])
 
if A < 9 and B < 9:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
 
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
ALL = input().split()
A = int(ALL[0])
B = int(ALL[1])

if A < 9 and B < 9:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
l = list(map(int,input().split()))

if l[0] <=8:
 if l[1]<=8:
	 print("Yay!")
 else:
	 print(":(")
else:
	print(":(")

Submission status: Accepted

Solution code:
#AtCoder Beginner Contest 099 A
a,b= map(int,input().split())

if (a <= 8) and (b <=8):
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
AB = [int(i) for i in input().split()]
A, B = AB[0], AB[1]

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
X, Y = map(int, input().split(" "))

if X > 8 or Y > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
A, B=map(int,input().split(' '))

if A>8 or B>8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

Solution code:
#A: Happy Birthday!
a,b = map(int,input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A,B=map(int,input().split());print(':('*(A>8or B>8)or'Yay!')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if 8 < a or 8 < b:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())

if a <= 8 and b<= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if(A <= 8 and B <= 8):
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<=8 and b<=8:
    print('Yay!')
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())


def f(a, b):
    if a <= 8 and b <= 8:
        print('Yay!')
    else:
        print(':(')


f(a, b)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if(a > 8 or b > 8):
	print(":(")
else:
	print("Yay!")

Submission status: Accepted

Solution code:
l = input().split()
a = int(l[0])
b = int(l[1])

if(a > 8 or b > 8):
    print (':(') 
else:
    print ('Yay!')

Submission status: Accepted

Solution code:
A, B = list(int(a) for a in input().split(" "))
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b = map(int,input().split());
print((a>8 or b>8)and":("or"Yay!");

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print((a>8or b>8)and':('or'Yay!')

Submission status: Accepted

Solution code:

a,b=map(int,input().split())

if(a<=8 and b<=8):
    print("Yay!")
else :
    print(":(")

Submission status: Accepted

Solution code:
A,B=list(map(int,input().split()))
if A<=8 and B<=8:
  print('Yay!')
else:
  print(":(")

Submission status: Accepted

Solution code:
def process(a, b):
    if a > 8 or b > 8:
        return ':('
    else:
        return 'Yay!'

def main():
    a, b = [int(i) for i in raw_input().strip().split()]
    print process(a, b)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
[a,b]=[int(i) for i in input().split()]
if a<=8 and b<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 8 and b <= 8:
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print('Yay!' if (a<=8 and b<=8) else ':(')

Submission status: Accepted

Solution code:
# coding:utf-8

a, b = map(int,input("").split())

if a >= 1 and a <= 8 and b >= 1 and b <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<= 8 and b<= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a > 8 or b > 8:
	print(':(')
else:
	print('Yay!')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a<=8 and b<=8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
A, B = (int(i) for i in input().split())
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
E = 1
s = 2
total = 16

A, B = map(int, input().split())

if ((A - 1) * 2 + 1 > total):
    print(':(')

elif ((B - 1) * 2 + 1 > total):
    print(':(')

else:
    print('Yay!')

Submission status: Accepted

Solution code:
print('Yay!' if max(list(map(int, input().split() ))) <= 8 else ':(')

Submission status: Accepted

Solution code:
N = input().split(" ")
if int(N[0]) < 9 and int(N[1]) < 9:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
reader = list(map(int, input().split()))
A_num = reader[0]
B_num = reader[1]

if A_num <= 8 and B_num <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
args = (input())
a = int( args.split(" ")[0])
b = int(args.split(" ")[1])

if(a>8 or b>8):
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if max(a, b) <= 8:
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if (A-1) <= 16 - A and B-1 <= 16 -B:
    print ("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if(a<=8 and b<=8):print("Yay!")
else:print(":(")

Submission status: Accepted

Solution code:
data = list(map(int,input().split()))
a = data[0]
b = data[1]
if(a>8 or b>8):
	print(":(")
else:
	print("Yay!")

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if a < 9 and b < 9:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
if A > 8 or B > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A, B = map(int, input().strip().split())

if A > 8 or B > 8:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
if A <= 8 and B <= 8:
 print "Yay!"
else:
 print ":("

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

if a > 8 or b > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())

if(A<=8 and B<=8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if a >= 9 or b >= 9:
        return ':('
    else:
        return 'Yay!'
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A,B = map(int,input().split(" "))
if A <= 8 and B <= 8:
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a, b):
    if a>8 or b>8:
        answer=':('
    else:
        answer='Yay!'
    return answer

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a,b):
    if 8>=a and 8>=b:     
        return'Yay!'
    else:
        return':('


# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
x = sys.stdin.readline()

[a,b] = x.split()
if int(a) > 8 or int(b) > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
a = input().split()
#print(a)
if int(a[0]) <= 8 and int(a[1]) <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b  = input().split()

if int(a) > 8 or int(b) > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
A,B = list(map(int, input().split()))

if A<=8 and B<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A+B <= 16 and A<=8 and B<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
answer = { True: 'Yay!', False: ':(' }
print(answer[0 <= A <= 8 and 0 <= B <= 8])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a > 8 or b > 8:
    print(":(")
    exit()

print("Yay!")

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
if A < 9 and B < 9:
  print 'Yay!'
else:
  print ':('

Submission status: Accepted

Solution code:
a,b=map(int,input().split(" "))
if(a>8 or b > 8):
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
a, b = map(int,  input().split())

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a >8:
    print(':( ')
elif b>8:
    print(' :( ')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
if max(a,b) > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
#abc100c

a,b=map(int,raw_input().split())
if a<=8 and b<=8:
 print 'Yay!'
else:
 print ':('

Submission status: Accepted

Solution code:
a,b = map(int, raw_input().split())
if a <= 8 and b <= 8:
  print "Yay!"
else:
  print ":("

Submission status: Accepted

Solution code:
S = raw_input()
L = S.split(" ")
if int(L[0]) <= 8 and int(L[1]) <= 8:
    print "Yay!"
else:
    print ":("

Submission status: Accepted

Solution code:
# input
A, B = map(int, input().split())

if A >= 9 or B >= 9:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-

A,B = map(int, input().split())

if A>8 or B>8:
    print(":(")
    exit()
print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a,b = map(int, raw_input().split())

if a<= 8 and b <= 8:
	print  'Yay!'
else:
	print ':('

Submission status: Accepted

Solution code:
l = list(map(int, input().split()))
A, B = l[0], l[1]

if A >= 9 or B >= 9:
    print(':(')
    exit()

print('Yay!')

Submission status: Accepted

Solution code:
def solve(a, b):
    return "Yay!" if (max(a, b) <= 8) else ":("

assert solve(5, 4) == "Yay!"
assert solve(8, 8) == "Yay!"
assert solve(11, 4) == ":("

a, b = map(int, raw_input().split())
print solve(a, b)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if(a>8 or b>8):
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
s = input().strip()
ss = s.split()
a = int(ss[0])
b = int(ss[1])
if a > 8 or b > 8:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
s = raw_input()
ss = s.split()
a = int(ss[0])
b = int(ss[1])
if a > 8 or b > 8:
	print ":("
else:
	print "Yay!"

Submission status: Accepted

Solution code:
A,B = map(int, input().split())
if A<=8 and B<=8:
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if max(a,b)<=8:
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
#coding : utf-8

if __name__ == "__main__":
    a,b = list(map(int,input().split()))
    if a <= 8 and b <= 8:
        print('Yay!')
    else:
        print(':(')

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
print('Yay!' if A <= 8 and B <= 8 else ':(')

Submission status: Accepted

Solution code:
ab = input().split()
[a, b] = map(int, ab)
if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
shares = input()
share_a, share_b = int(shares.split()[0]), int(shares.split()[1])

if share_a > 8 or share_b > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力

a, b = map(int, input().split())

smaller = min(a, b)
bigger = b if a == smaller else a

diff = bigger - smaller
residual = 16 - smaller * 2
if diff * 2 > residual:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
A, B =map(int,input().split())
if A <=8 and B <= 8:
  print('Yay!')
else:
  print(':(')

Submission status: Accepted

Solution code:
def read():
    return int(input())


def readlist():
    return list(map(int, input().split()))


def readmap():
    return map(int, input().split())


A, B = readmap()

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# AtCoder Beginner Contest


if __name__ == '__main__':
    a, b = map(int, input().split())

    if a <= 8 and b <= 8:
        print('Yay!')
    else:
        print(':( ')

Submission status: Accepted

Solution code:
def main():
    
    A, B = map(int, input().split())
    
    if A>8 or B>8:
        print(":(")
    else:
        print("Yay!")
    
    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a > 8 or b > 8:
 print(':(')
else:
 print('Yay!')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print("Yay!" if a < 9 and b < 9 else ":(")

Submission status: Accepted

Solution code:
x,y = map(int,input().split())

if x <= 8 and y <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a, b =  map(int, input().split())

if a <= 8 and b <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a ,b=map(int,input().split())
print("Yay!" if a<=8 and b<=8 else ":(")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if (a <= 8 and b <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b = map(int, input().split( ))

if(a <= 8 and b <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int ,input().split())

if(a <= 8 and b <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a <= 8 and b <= 8:
    ans = 'Yay!'
else:
    ans = ':('

print(ans)

Submission status: Accepted

Solution code:
a,b = map(int,input().split(' '));
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# ANSHUL GAUTAM
# IIIT-D
 
a,b = map(int, input().split())
if(a+b>16):
	print(":(")
elif(a==8 and b==8):
	print("Yay!")
elif(max(a,b)>8):
	print(":(")
else:
	print("Yay!")

Submission status: Accepted

Solution code:
n=list(map(int,input().split()))
A=n[0]
B=n[1]
if(A>8 or B>8):
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A, B = [int(e) for e in input().split()]

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a,b = list(map(int,raw_input().split()))
if a <= 8 and b <= 8:
    print "Yay!"
else:
    print ":("

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('Yay!' if (a<=8 and b<=8) else ':(')

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())

if A > 8:
    print ":("
elif B > 8:
    print ":("
else:
    print "Yay!"

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Jun 16 23:09:00 2018

@author: sakas
"""
A, B = map(int, input().split())
if A>=9 or B>=9:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import itertools
import math


def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


A, B = map(lambda x: int(x), input().split())
cake = range(1, 17)

pattern_A = [pattern for pattern in itertools.combinations(cake, A)]
# pattern_B = [pattern for pattern in itertools.combinations(range(len(cake)-A), B)]
iter_cakeB = []
for pat in pattern_A:
    cake1 = list(range(1, 17))
    for i in pat:
        cake1.remove(i)
    iter_cakeB.append(cake1)


pattern_B = [[[] for _ in range(combinations_count(len(cake)-A, B))]
             for i in range(len(iter_cakeB))]

for i, cake_put_by_A in enumerate(iter_cakeB):
    for j, pattern in enumerate(itertools.combinations(cake_put_by_A, B)):
        pattern_B[i][j] = pattern
# print(len(pattern_B))


flag = False
for cnt, patA in enumerate(pattern_A):
    a = [patA[i + 1] - patA[i] for i in range(len(patA)) if i < len(patA)-1]
    if 1 in a:
        continue
    else:
        for patB in pattern_B[cnt]:
            b = [patB[i + 1] - patB[i] for i in range(len(patB)) if i < len(patB)-1]
            if 1 in b:
                continue
            else:
                print('Yay!')
                flag = True
                break
    if flag:
        break

if cnt == len(pattern_A)-1:
    print(':(')

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    a, b = map(int, input().split())
    if a <= 8 and b <= 8:
        print("Yay!")
    else:
        print(":(")

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print("Yay!" if a < 9 and b < 9 else ":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split(" "))
if a<=8 and b<=8: 
    print("Yay!")
else    :
    print(":(")

Submission status: Accepted

Solution code:
line = input().split(' ')
a = line[0]
b = line[1]

if int(a) > 8 or int(b) > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
if a < 9 and b < 9:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys

get = sys.stdin.readline()
a, b = get.split(" ")
if (max(int(a), int(b)) <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 0 or a >= 17:
    print("Invalud numbers are entered.")
elif a + b >= 17:
    print("Invalud numbers are entered.")
elif a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())
if (A <= 8 and B <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
print("Yay!" if all([int(x)<9 for x in input().split()]) else":(")

Submission status: Accepted

Solution code:
A,B=[int(i) for i in input().split()]
if A<=8 and B<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A >= 9:
    print(":(")
elif B >= 9:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
s = input().rstrip().split()

if(int(s[0]) <= 8 and int(s[1]) <= 8):
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A<9 and B<9:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if a<=8 and b<=8:
    print('Yay!')
else:
    print(':(' )

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
a + b <= 16
if a > 8 or b > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A, B = map(int, raw_input().split())
if A < 9 and B < 9 :
    print "Yay!"
else:
    print ":("

Submission status: Accepted

Solution code:
A,B=(int(i) for i in input().split())

if A>=9 or B>=9 or (A+B)>16 : print(':(')
else: print('Yay!')

Submission status: Accepted

Solution code:
A,B = map(int, input().split())

if (A > 8) or (B > 8):
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# cook your code here
a,b=map(int,raw_input().split())
if a>8 or b>8: print ':('
else: print 'Yay!'

Submission status: Accepted

Solution code:
S = input().split()
A = int(S[0])
B = int(S[1])
if A <= 8:
    if B <= 8:
        C = "Yay!"
    else:
        C = ":("
else:
    C = ":("
print(C)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if A <= 8 and B <= 8:
  print("Yay!")
else :
  print(":(")

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
if A>8 or B>8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
l=list(map(int,input().split()))
if max(l)<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a <= 8 and b<= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())

if a > 8 or b > 8:
	print(':(')
else:
	print('Yay!')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
A, B = map(int, input().split())

if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:


def run(a, b):
    if a > 8 or b > 8:
        return ':('
    else:
        return 'Yay!'


def read_line():
    a, b = input().split()
    a = int(a)
    b = int(b)
    return (a, b)


def main():
    a, b = read_line()
    print(run(a, b))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, m = map(int, input().split())
if max(n, m) > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A, B = map(int, input().split())

if (A > 8) or (B > 8):
    print (":(")
else:
    print ("Yay!")

Submission status: Accepted

Solution code:
inp = input()
inp2 = inp.split()
A=int(inp2[0])
B=int(inp2[1])
if A >8 or B>8:
	print(":(")
else:
	print("Yay!")

Submission status: Accepted

Solution code:
a, b = list(map(int, input().split()))
 
s = 16
for i in range(16):
	if i%2 == 0:
		if a > 0:
			s -= 1
			a -= 1
	else:
		if b > 0:
			s -= 1
			b -= 1
	if s < 0:
		break
 
if a > 0 or b > 0:
	print(':(')
else:
	print('Yay!')

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
cake = '1234567890123456'
for i in range(8):
	if a != 0:
		cake.replace(cake[2*1], 'o')
		a -= 1
	if b != 0:
		cake.replace(cake[2*1+1], 'x')
		b -= 1
if a != 0 or b != 0:
	print ':('
else :
	print 'Yay!'

Submission status: Accepted

Solution code:
ab = input()
a, b = ab.split()
A = int(a)
B = int (b)
if A > 8 or B > 8:
    res = ':('

else:
    res = 'Yay!'

print(res)

Submission status: Accepted

Solution code:
# n = int(input())
a, b = map(int, input().split())
# c = list(map(int, input().split()))
# d = [list(map(int, input().split())) for _ in range(n)]
# s = input()


if a <= 8 and b <= 8:
    ans ="Yay!"
else:
    ans = ":("

print(ans)

Submission status: Accepted

Solution code:
A,B = map(int,input().split())

if A < 9 and B < 9:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]
 
if a <= 8 and b<= 8:
    print ("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
ui = input()
D, N = int(ui.split()[0]), int(ui.split()[1])
if D <= 8 and N <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a<=8 and b <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b = input().split()
a = int(a)
b = int(b)
if max(a,b) > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A, B  = map(int, input().split())
if A <= 8 and B <= 8:
   print("Yay!")
else:
   print(":(")

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if max(A, B) <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
p = 0
if A>8:
	p = 1
if B>8:
	p = 1
if p==0:
	print("Yay!")
else:
	print(":(")

Submission status: Accepted

Solution code:
[A, B] = [int(x) for x in input().split()]
if A < 9 and B < 9:
  print('Yay!')
else:
  print(':(')

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=max(a,b)
if ans<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
tmp = input()
a = int(tmp.split(" ")[0])
b = int(tmp.split(" ")[1])
 
if a <= 8:
    if b <= 8:
        print("Yay!")
    else:
        print(":(")
else:
    print(":(")

Submission status: Accepted

Solution code:
a,b=map(int, input().split())
if a>8 or b>8:print(':(')
else:print('Yay!')

Submission status: Accepted

Solution code:
#-*- coding: utf-8 -*-
# A, B の標準入力
A, B = map(int, input().split())

# 条件クリアならYay! そうでなければ:(
if (A > 8 )  or (B > 8) :
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

A, B = map(int, input().split())

if A<=8 and B<=8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b = map(int, input().split())

ans_success = "Yay!"
ans_fail = ":("


def get_ans(a, b):
    if a == 8 and b == 8:
        return ans_success
    if a > 8 or b > 8:
        return ans_fail
    else:
        return ans_success


# 出力
print(get_ans(a, b))

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
if(A > 8 or B > 8):
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
 
if A <= 8:
    if B <= 8:
        print('Yay!')
    else:
        print( ':(') 
else:
    print( ':(')

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
print("Yay!" if n<=8 and m <=8 else ":(")