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:
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 or b > 8:
    print(':(')
else:
    print("Yay!")

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    return 'Yay!' if a <= 8 and b <= 8 else ':('

if __name__ == '__main__':
    ans = main()
    print(ans)

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().split())
if a > b:
    a, b = b, a

def main():
    d  = b - a
    if d <= 1:
        return 'Yay!'
    elif 16 - a * 2 >= d * 2:
        return 'yay!'
    else:
        return ':('

if __name__ == '__main__':
    ans = main()
    print(ans)

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:
n,m = map(int,input().split())
if n < 9 and m < 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 = 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 not (A>8 or 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:
import sys
input = sys.stdin.readline
A, B = [int(x) for x 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("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 = list(map(int, input().split()))
if a<=8 and b<=8:
  print('Yay!')
else:
  print(':(')

Submission status: Accepted

Solution code:

import sys
input = sys.stdin.readline
A, B = map(int, input().split())
if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
# データ読み込み

import sys
from collections import deque

def input_data(d=""):
  t = sys.stdin.read()
  if t:
    return t
  else:
    if d[0] == "\n":
      d = d[1:]
    if d[-1] == "\n":
      d = d[:-1]    
    return d

A, B  = map(int,input_data().split())
A
out = ":("
if A <= 8 and B <= 8:
  out = "Yay!"

print(out)

Submission status: Accepted

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

ans = ":("

if A < 9 and B < 9:
    ans = "Yay!"

print(ans)

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 = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = (int(x) for x 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 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())
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:
num = list(map(int,input().split()))
print("Yay!" if num[0]<=8 and num[1]<=8 else ":(")

Submission status: Accepted

Solution code:
A,B = [int(x) for x 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:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

# code here
a, b = map(int, input().strip().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 = list(map(int,input().split()))
if A > 8 or B > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
import sys

a, b = map(int, sys.stdin.readline().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:
lo = input()
num = lo.split(" ")
A = int(num[0])
B = int(num[1])
if A>8 or 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() )
print( [ ":(", "Yay!" ][ A <= 8 and B <= 8 ] )

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 max(a,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 = [int(x) for x 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:
print("Yay!" if all(map(lambda num: int(num) <= 8, input().split())) else ":(")

Submission status: Accepted

Solution code:
a, b = map(int,input().split())
if a*2 > 16 or b*2 > 16:
  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())
print('Yay!' if a<9 and b<9 else ':(')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    if a<=8 and b<=8:
        print('Yay!')
    else:
        print(':(')
if __name__ == '__main__':
    do()

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())
print("Yay!" if a<9 and b<9 else ":(" )

Submission status: Accepted

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

a = 16 - 2*min(A, B) + 1
b = max(A,B) - (min(A,B)-1)

if b<=(a/2 +1):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=[int(x) for x in 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 or b > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
data = list(map(int,input().split()))
A = data[0]
B = data[1]

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split(" "))
N = 8
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:
# ABC100a
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, B: int):
    if 16 - 2 * min(A, B) >= 2 * abs(A - B):
        print("Yay!")
    else:
        print(":(")

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

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:
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 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:
def examA():
    A, B = LI()
    ans = "Yay!"
    if A>8 or B>8:
        ans = ":("
    print(ans)




import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

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=list(map(int,input().split(" ")))

if A<=8 and B<=8: # 配分できる場合
    print("Yay!")
else: # できない場合
    print(":(")

Submission status: Accepted

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

#入力
#S = str(input())
A, B = map(int, input().split())
#N = int(input())

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:
A,B = map(int,input().split())
print('Yay!') if A<= 8 and B <= 8 else print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

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 or b>8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

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

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 max(a, 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())
if 1<=a<=8 and 1<=b<=8 :
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin
import fractions

a,b = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

if a > 8 or b > 8:
  ans = ":("
else:
  ans = "Yay!"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
a, b = input().split(' ')
print(':(' if int(a) > 8 or int(b) > 8 else '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 abs(A-B)<=1:
  ans="Yay!"
else:
	ans=":( "
print(ans)

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 <= 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:
#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())
if (a<9)&(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:
#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

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:
print("Yay!" if all(int(i) <= 8 for i in input().split()) 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:
#                         author:  kagemeka 
#                         created: 2019-11-08 12:38:16(JST)
## internal modules
import sys
# import collections
# import math
# import string
# import bisect
# import re
# import itertools
# import statistics
# import functools
# import operator
## external modules
# import scipy.special   # if use comb function on AtCoder, 
# import scipy.misc      # select scipy.misc.comb (old version) 

def main():
    a, b = (int(x) for x in sys.stdin.readline().split())
    if abs(a - b) <= 1:
        ans = 'Yay!'
    else:
        more_eat = max(a, b) - (min(a, b) + 1)
        remainder = 16 - (min(a, b) * 2 + 1)
        
        if more_eat <= remainder // 2:
            ans = 'Yay!'
        else:
            ans = ':('

    print(ans)

if __name__ == "__main__":
    # execute only if run as a script
    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:
a, b = map(int, input().split())
if (a <= 8) & (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:
# -*- coding: utf-8 -*-
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())
print('Yay!' if a<=8 and b<=8 else ':(')

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print("Y:a(y !"[a > 8 or b > 8::2])

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:
n = [int(i) for i in input().split()]
flag = True
if(n[0]>8):
  flag = False
elif(n[1]>8):
  flag = False
if(flag == True):
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
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<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())

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:
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 < 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 or a<0 or b<0:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs= sys.stdin.buffer.readlines
#rstrip().decode('utf-8')

#import numpy as np
#import operator
#from heapq import heapify,heappop,heappush
#from math import gcd
#from fractions import gcd
#from collections import deque
#from collections import defaultdict
#from collections import Counter
#from itertools import accumulate
#from itertools import groupby
#from itertools import permutations
#from itertools import combinations
#from scipy.sparse import csr_matrix
#from scipy.sparse.csgraph import floyd_warshall
#from scipy.sparse.csgraph import csgraph_from_dense
#from scipy.sparse.csgraph import dijkstra
#sys.setrecursionlimit(10**7)

#map(int,input().split())

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






if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
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 = raw_input().split()

if int(a_b[0]) > 8 or int(a_b[1]) > 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 = input().split()
a = int(a)
b = int(b)

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

Submission status: Accepted

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

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:

if __name__ == '__main__':

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math

def resolve():
    A,B=map(int,input().split())
    if A<=8 and B<=8:
        print('Yay!')
    else:
        print(":(")
 
 
if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

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())
print('Yay!' if a <= 8 and b <= 8 else ':(')

Submission status: Accepted

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

if a > 8:
    result = False
elif b > 8:
    result = False

if result == False:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
YES = 'Yay!'
NO = ':('

takes = map(int, input().split())

p = len(tuple(filter(lambda x: 0 <= x <= 8, takes)))

print(YES if p == 2 else NO)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

Submission status: Accepted

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

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:
A,B = map(int,input().split())
if (A <= 8) and (B <= 8):
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    resolve()

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 = list(map(int,input().split()))
A=a[0]
B=a[1]

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

Submission status: Accepted

Solution code:
#2019/10/13
A, B = map(int, open(0).read().split())
print("Yay!" if A<=8 and B<=8 else ":(")

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());print('Yay!'if A<9and B<9else ':(')

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())
x = 16 // 3
if a <= 8 and b <= 8:
    print('Yay!')
elif a == b:
    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())
print('Yay!' if max(a,b)<9 else ':(')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B= (int(x) for x in input().split())
if A > 8 or B > 8:
  print(':(')
elif A <= 8 and B <= 8:
  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())
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 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 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:
N, M = list(map(int, input().split()))
if N <= 8 and M <= 8:
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    print("Yay!" if a <= 8 and b <= 8 else ":(")


if __name__ == '__main__':
    slove()

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 = tuple(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 >= 9 or b >= 9:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(['Yay!',':('][max(map(int,input().split()))>8])

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("Y:a(y !"[a>8 or 8<b::2])

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
cakes = [i for i in range(1, 17)]
if A <= len(cakes[0::2]) and B <= len(cakes[1::2]):
    print('Yay!')
else:
    print(':(')

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:
    print(':(')
    exit()
if b > 8:
    print(':(')
    exit()
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:
a,b = map(int, input().split())
print("Yay!" if a <= 8 and b <=8 else ":(")

Submission status: Accepted

Solution code:
ls=[int(s) for s in input().split()]
if max(ls)>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(x) for x in input().split()]
if A*2>16 or B*2>16:
  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<9 and B<9:
    print('Yay!')
else:
    print(':(')