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

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=max(list(map(int,input().split())));print(':('if a>8 else'Yay!')

Submission status: Accepted

Solution code:
a = list(map(int,input().split()))
if a[0]<=8 and a[1]<=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:
#!/usr/bin/env python3
#ABC100 A

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

f = 1
if A > 8:
    f = 0
if B > 8:
    f = 0
if f:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

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

if x[0]<9 and x[1]<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:
#110
S = list(map(int,input().split()))
ans=max(S)<=8
if ans:
    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 A/2>4 or B/2>4:
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
x, y=map(int, input().split())
res='Yay!'
if x>8 or y>8:
	res=':('
print(res)

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, B = nl()

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
if 16-min(A,B)*2 >= abs(A-B)*2:
    print("Yay!")
else:
    print(":(")

Submission status: Accepted

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


def solve(A: int, B: int):
    if A % 2 != 0 or B % 2 != 0:
        if A > 8 or B > 8:
            print(':(')
            return

    print('Yay!')
    return


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

if a<9 and b<9:
  print("Yay!")
elif 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:
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 = [int(i) for i in input().split()]
if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')

Submission status: Accepted

Solution code:
def main():
    n = [int(i) for i in input().split()]
    if n[0] < 9 and n[1] < 9:
        print("Yay!")
    else:
        print(":(")


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

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().split())
slices = [0 for x in range(16)]
i = 0
while a != 0 and b != 0 and i < 15:
    slices[i] = 0
    slices[i + 1] = 1
    a -= 1
    b -=1
    i += 2

while a > 0 and i < 15:
    slices[i] = 0
    a -= 1
    i += 2
 
while b > 0 and i < 15:
    slices[i] = 1
    b -= 1
    i += 2

print "Yay!" if a == 0 and b == 0 else ":("

Submission status: Accepted

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

if(parameters[0] <= 8 and parameters[1] <= 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:
#coding: utf-8

x, y = map(int, raw_input().split())

result = 'Yay!'
if y > 8 or x > 8:
    result = ':('

print result

Submission status: Accepted

Solution code:
n , m = map(int, raw_input ().split())

if m > 8 or n > 8:
    print ":("
else: 
    print "Yay!"

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, raw_input().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:
# coding: utf-8
import re
import bisect
from datetime import datetime as dt
import bisect
import math
import sys
input = sys.stdin.readline

def gcd(a, b):
    return math.gcd(a, b)

def lcm(a, b):
    return a * b / gcd(a, b)

class slist(list):
    def __init__(self, *args, **kw):
        list.__init__(self, *args, **kw)
        self.sort()

    def append(self, value):
        bisect.insort(self,value)

    def index_left(self, value):
        return bisect.bisect_left(self, value)


if __name__ == '__main__':
    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


def solve(A: int, B: int):
    d = abs(A - B)
    r = 16 - A - B
    if d <= (r // 2):
        print("Yay!")
    else:
        print(":(")
    return


# Generated by 1.1.4 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 max(A, B) <= 8:
  print('Yay!')
else:
  print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print('Yay!' if all([x < 9 for x in map(int, 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 max(a, b) > 8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

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

Submission status: Accepted

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


abc()

Submission status: Accepted

Solution code:
A, B = [int(ab) for ab in 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:
ab = input().split()
ab = [int(ab[i]) for i in range(2)]
ab.sort()
#a > bになる
a = ab[1]
b = ab[0]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = a + b

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 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:
first = input()
(sA,sB) =  first.split()
A = int(sA)
B = int(sB)
if A >= 9 or B >= 9:
    print(":(")
else:
    print("Yay!")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import numpy as np
import statistics
from statistics import mean, median,variance,stdev
import math

def main():
	A, B = map(int, input().split(" "))
	
	if 8 < A or 8 < B:
		print(":(")
		sys.exit()
		
	if A + B > 16:
		print(":(")
		sys.exit()
		
	print("Yay!")
	
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 or B > 8):
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

Solution code:
def f(A, B):
    C = 16 - min(A, B) * 2
    return C // 2 >= max(A, B) - min(A, B)


A, B = map(int, input().split())
print('Yay!' if f(A, B) 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:
data = list(map(int,input().split()))
if abs(data[0]-data[1]) > 1:
        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 > 8 or b > 8:
  print(':(')
else:
  print('Yay!')

Submission status: Accepted

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

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

if 8-a >= 0 and 8-b >= 0:
    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 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, raw_input().split())
if A <= 8 and B <= 8: print 'Yay!'
else: print ':('

Submission status: Accepted

Solution code:
a, b = [ int(v) for v 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:
e,s = map(int, input().split())
if 8>=e and s<=8:
    print("Yay!")
elif 8<e or 8<s:
    print(":(")

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
cake = 16
if cake / 2 >= a and cake / 2 >= 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:
#print("please, type A and B")
ab_list = input().split()
A_cake = int(ab_list[0])
B_cake = int(ab_list[1])

if (not 1<= A_cake <=16) or (not 1<= B_cake <=16) or (A_cake + B_cake > 16):
    #print("something is wrong with your input")
    print(":(")
    #print("A:"+str(A_cake))
    #print("B:"+str(B_cake))
    exit()


Acnt = A_cake
Bcnt = B_cake

for i in range(16):
    if i % 2 == 0:
        Acnt -= 1
    else:
        Bcnt -= 1

if Acnt <= 0 and Bcnt <= 0:
    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())
maximum = 8

if a+b <= 16 and a <= maximum and b <= maximum:
    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


def solve(A: int, B: int):
    print( "Yay!" if A <= 8 and B <=8 else ":(" )


# Generated by 1.1.4 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())

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

else:
    print(":(")

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

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

solve()

Submission status: Accepted

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

flg = 1 #食べれない

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

Submission status: Accepted

Solution code:
a, b = input().split()
a, b = int(a), int(b)
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())
ma=max(a,b)
cnt=ma*2

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


def solve(A: int, B: int):
    if max(A, B) > 8:
        ret = ':('
    else:
        ret = 'Yay!'
    print(ret)
    return


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

from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance


###############################################################################


def main():
    a, b = intin()

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

Submission status: Accepted

Solution code:
A, B = [int(i) for i in input().split()]
print(":(") if max(A, 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:
A,B = [int(i) for i in input().split()]

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# IMPORT ###############################################################################################################
import sys                                                      # システム
sys.setrecursionlimit(10**6)                                    # 再帰処理の上限変更
from collections import deque, Counter                          # キュー・個数カウント
from itertools   import accumulate, permutations, combinations  # 累積和・順列・組み合わせ
from operator    import itemgetter                              # ソート補助
from bisect      import bisect_left, bisect_right, bisect       # 二分探索
from heapq       import heappop, heappush                       # プライオリティキュー
from fractions   import gcd                                     # 最大公約数
from math        import ceil, floor, sqrt, cos, sin, tan, pi    # 数学処理
from copy        import deepcopy                                # オブジェクトコピー
import numpy         as np                                      # 数値計算

# MAIN #################################################################################################################
def main():
    # Init #############################################################################################################
    im = InputManager()
    # Input ############################################################################################################
    a, b = im.inputMultiple()
    # Logic ############################################################################################################
    if a > 8 or b > 8:
        print(":(")
    else:
        print("Yay!")
    # Output ###########################################################################################################

    # Return ###########################################################################################################
    return

# INPUT MANAGER ########################################################################################################
class InputManager(object):
    def __init__(self):
        pass

    @staticmethod
    def inputSingle(dtype=int):
        return dtype(input())
    
    @staticmethod
    def inputMultiple(dtype=int, aslist=False):
        if aslist:
            return list(map(dtype, input().split()))
        else:
            return map(dtype, input().split())

    @staticmethod
    def input2D(h, dtype=int):
        return [list(map(dtype, input().split())) for i in range(h)]

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

Submission status: Accepted

Solution code:
b, c = map(int, input().split())
if(max(b,c) > (16 / 2)):
  print(":(")
else:
  print("Yay!")

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
print("Yay!") if A < 9 and B < 9 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 = [int(i) for i in input().split()]
if A > 8:
    print(':(')
elif B > 8:
    print(':(')
else:
    print('Yay!')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}

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:
xs = map(int, input().split())
check= all(x <= 8 for x in xs)
print ("Yay!" if check else ":(")

Submission status: Accepted

Solution code:
xs = map(int, input().split())
test = all(x <= 8 for x in xs)
print ("Yay!" if test else ":(")

Submission status: Accepted

Solution code:


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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<9 and b<9 else ":(")

Submission status: Accepted

Solution code:
from sys import stdin

A, B = stdin.readline().rstrip().split()

if (int(A) <= 8) & (int(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 read_input():
	a, b = map(int, input().split())
	return a, b
	
	
def submit():
	a, b = read_input()
	
	if a <= 8 and b <= 8:
		print('Yay!')
	else:
		print(':(')
	
	
if __name__ == '__main__':
	submit()

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

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

Submission status: Accepted

Solution code:
# 2019/05/01
# AtCoder Beginner Contest 100 - A

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

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

# Output
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import numpy as np
import math
import re
import functools

n = input()
n = re.split(" ",n)

a = int(n[0])
b = int(n[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 = list(map(int, input().split()))
print(':(' if (A >= 9 or B >= 9) else 'Yay!')

Submission status: Accepted

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

if (A >= 9 or B >= 9) :
    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(':(')