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:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return list(sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))

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

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
A, B = ri_()
print('Yay!' if max(A, 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<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 (max(a,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:
# 偶数-> E869120 君,奇数-> square1001 君と決め打ち
# -> 各々8切れより多くは取れない
wantToEat = [int(i) for i in input().split(" ")]
if wantToEat[0] > 8 or wantToEat[1] > 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 or b > 8:
        print(':(')
    else:
        print('Yay!')
        
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(':(') if a > 8 or b > 8 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:
#!/usr/bin/env python3

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>=9 or B>=9:
    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:

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 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:
#! python3

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

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())
c = abs(a-b)
print("Yay!" if a+b+c <= 16 else ":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print([':(', 'Yay!'][int((a <= 8) & (b <= 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())

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!")
elif A==8 and B == 8:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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 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:
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 abs(a-b)<=1 else ":(")

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

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

Submission status: Accepted

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

A, B = MAP()
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:
import sys
import os
import math
import string

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


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

Submission status: Accepted

Solution code:
import sys

s = input().split(' ')
x, y = int(s[0]), int(s[1])

if (x > 8 or y > 8):
	print (":(")
else:
	print ("Yay!")

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def judge(b):
  print("Yay!" if b else ":(")
  exit()

if A <= 8 and B <= 8:
  judge(1)
else:
  judge(0)

Submission status: Accepted

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

c = 2*max(a,b)

if c <= 16:
  print("Yay!")
  
else:
  print(":(")

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:
#!/usr/bin/env python3
import sys

YES = "Yay!"
NO = ":("

def solve(A: int, B: int):
    m = "null"
    for i in range(16):
        if A == 0 and B == 0:
            break
        if i != 15:
            if A > 0 and m != "A":
                A -= 1
                m = "A"
            elif B > 0 and m != "B":
                B -= 1
                m = "B"
            else:
                m = "Brank"
        else:
            if B > 0 and m != "B":
                B -= 1

    if A == 0 and B == 0:
        print(YES)
    else:
        print(NO)

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

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 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:
#!/usr/bin/env python3

def main():
    a, b = map(int,input().split())
    space = 16 - (a + b)
    gap = abs(a-b)
    if gap <= -(-space // 2):
        print("Yay!")
    else:
        print(":(")

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

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 math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a, b = nm()

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

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:
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:
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())
A = max(a,b)
B = min(a,b)
res = 16
while True:
  A -= 1
  res -= 1
  B -= 1
  res -= 1
  if B == 0: break
    
if A <= res//2:
  print("Yay!")
else:
  print(":(")

Submission status: Accepted

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

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:
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())
print("Yay!") if abs(a-b) < min(a,b) else print(":(")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m=map(int,input().split())
if n>8 or m>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:
def resolve():
    A, B = list(map(int, input().split(" ")))
    if A < B:
        A, B = B, A
    res = (A - B) <= (16 - 2 * B) / 2
    print("Yay!" if res else ":(")    

if '__main__' == __name__:
    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, 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=[int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
linha = input()
pessoaA, pessoaB = [int(n) for n in linha.split()]
if pessoaA > 8 or pessoaB > 8:
    print(":(")
else:
    print("Yay!")

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:
line = input()
num_a, num_b = [int(n) for n in line.split()]
is_it_possible = "Yay!"
if num_a > 8 or num_b > 8:
    is_it_possible = ":("
print(is_it_possible)

Submission status: Accepted

Solution code:
line = input()
a, b = [int(n) for n in line.split()]

if a>=b:
    c = a/2
    d = 16-a
    if c>d or a>8:
        print(":(")
    else:
        print("Yay!")
else:
    c = b/2
    d = 16 -b
    if c>d or b>8:
        print(":(")

    else:
        print("Yay!")

Submission status: Accepted

Solution code:
line = input()
a, b = [int(n) for n in line.split()]
if(a + b > 16):
    print(":(")
elif(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 = [int(n) for n in input().split()]
if(a + b > 16):
    print(":(")
elif(a <= 8 and b <= 8):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
line = input()
a, b = [int(n) for n in line.split()]

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

elif a == b or a < b or b < a:
    print("Yay!")

Submission status: Accepted

Solution code:
line = input()

a, b = [int(n) for n in line.split()]

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

Submission status: Accepted

Solution code:
def main():
    line = input()
    A, B = [int(n) for n in line.split()]
    if A <= 8 and B <= 8 and A + B <= 16:
        print('Yay!')
    else:
        print(':(')
main()

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:
line = input()
A, B = [int(n) for n in line.split()]
print('Yay!' if A <= 8 and B <= 8 else ':(')

Submission status: Accepted

Solution code:
line = input()
A, B = [int(n) for n in line.split()]
if A > 8 or B > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
num = input()
a = int(num.split(' ')[0])
b = int(num.split(' ')[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:
#!python3

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


def main():
    if A > 8 or B > 8:
        ans = ":("
    else:
        ans = "Yay!"
    print(ans)


if __name__ == "__main__":
    main()

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()

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

if abs(a-b) * 2 <= 16 - 2 * min(a, b):
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

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

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=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<0 or a>16) or (b<0 or b>16) or (a+b>16)):
    #print("error\n")
count=16
flag=False
pic=0 # 0=a,1=b
while(count>0):
    if(pic==0):
        a-=1
        count-=1
        pic=1    
    elif(pic==1):
        pic=0
        b-=1
        count-=1
    if(a<=0 and b<=0):
        flag=True
        break
if(flag==True):
    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:
ab = [int(e) for e in input().split()]
#b = int(input())
if (ab[0] < 9)&(ab[1] < 9):
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

Solution code:
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left #bisect_left(list, value)
#from fractions import gcd
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
def pri(x): print('\n'.join(map(str, x)))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  a, b = map(int, readline().split())
  if a<=8 and b<=8:
    print('Yay!')
  else:
    print(':(')
  
  
  
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:
# ABC 100: A – Happy Birthday!
a, b = [int(s) for s in 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())
if A <= 8 and B <= 8:print("Yay!")
else: print(":(")

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b = LI()
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:
#!/usr/bin/env python3
import sys
from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
from collections import defaultdict          # subclass of dict. defaultdict(facroty)
from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
from heapq import heapify, heappush, heappop # heapify(L) changes list in-place in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(nlgk)=O(n).
from itertools import accumulate             # accumulate(iter[, f])
from functools import reduce                 # reduce(f, iter[, init])
from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
from fractions import gcd                    # for Python3.4.3


def main():
    input = sys.stdin.readline    # 改行文字が残ることに注意
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def ii():  return int(input())
    def mi():  return map(int, input().rstrip().split())
    def lmi(): return list(map(int, input().rstrip().split()))
    def li():  return list(input().rstrip())
    
    
    a, b = mi()
    a, b = max(a, b), min(a, b)
    print("Yay!") if 2*a <= 16 else print(":(")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int,input().split(" "))
if A+B>16:
    print(":(")
else:
    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 max(a,b) <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
import sys

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

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

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

def main():
    r, c = 16 - b * 2, a - b
    ans = 'Yay!' if c <= r // 2 else ':('
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] >8 or a[1]>8:
        print(":(")
    else:
        print("Yay!")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))
a,b = iim()

if 8-min(a,b) < abs(a-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:
#template
def inputlist(): return [int(j) for j in input().split()]
from collections import Counter
#template
#issueから始める
A,B = inputlist()
if A > 8 or B > 8:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
def happy(a , b):

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

def main():
    a , b = map(int , input().split())
    print(happy(a , b))

if __name__ == '__main__':
    main()

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

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<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())
print(":(" if A>8 or B>8 else "Yay!")

Submission status: Accepted

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

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