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: Wrong Answer

Solution code:
import sys

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

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

Submission status: Wrong Answer

Solution code:
import sys

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

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

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

Submission status: Wrong Answer

Solution code:
a = input().split()
if int(a[0]) == 0:
    if int(a[1]) != 100:
        print(int(a[1]))
    else:
        print("101")
elif int(a[0]) == 1:
    if int(a[1]) != 100:
        print(int(a[1]) * 100)
    else:
        print("10100")
else:
    if int(a[1]) != 100:
        print(int(a[1]) * 10000)
    else:
        print("1010000")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d, n  = map(int, input().split())

if d == 0:
    if n == 100:
        print(101)
    else:
        print(1 * n)
if d == 1:
    if n == 100:
        print(10001)
    else:
        print(100 * n)
if d == 2:
    if n == 100:
        print(1000001)
    else:
        print(10000 * n)

Submission status: Wrong Answer

Solution code:
d, n  = map(int, input().split())

if d == 0:
    print(1 * n)
if d == 1:
    print(100 * n)
if d == 2:
    print(10000 * n)

Submission status: Wrong Answer

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

if int(a) >= 9 or int(b) >= 9:
    print(":(")
else:
    print("yay!")

Submission status: Wrong Answer

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

if int(a) < 1 or int(b) < 1:
    print(":(")

if int(a) + int(b) > 16:
    print(":(")

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D, N = [int(i) for i in input().split()]
base = pow(100, D)
print(N * base if N != 100 else 101 * base)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
D, N = [int(i) for i in input().split()]
base = pow(100, D)

i  = 0
while D > 0:
  i += 1
  if i % base == 0:
    continue
  D -= 1

print(i * base)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
d,n=map(int,input().split())
if(d==0):
    print(n)
else:
    print(n*(100**d))

Submission status: Wrong Answer

Solution code:
s = input().strip()
ss = s.split()
d = int(ss[0])
n = int(ss[1])
i = 1
while 1:
	x = i
	c = 0
	while x % 100 == 0:
		x //= 100
		c += 1
	if c == d:
		n -= 1
		if n == 0:
			print(i)
			break
	i += 1

Submission status: Wrong Answer

Solution code:
s = raw_input()
ss = s.split()
d = int(ss[0])
n = int(ss[1])
i = 1
while 1:
	x = i
	c = 0
	while x % 100 == 0:
		x //= 100
		c += 1
	if c == d:
		n -= 1
		if n == 0:
			print i
			break
	i += 1

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())
if N<100:
	if D==0:
		print(N)
	elif D==1:
		print(100*N)
	else:
		print(10000*N)
else:
	if D==0:
		print(101)
	elif D==1:
		print(10100)
	else:
		print(1010000)

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())
print(100**D*N)

Submission status: Wrong Answer

Solution code:
D, N = [int(i) for i in input().split()]
if D == 0 and N != 100:
	ans = N
elif D == 1 and N != 100 :
	ans = N*(100**D)
elif D == 1 and N == 100 :
	ans = 10100
elif D == 2 and N != 100 :
	ans = N*(100**D)
elif D == 2 and N == 100 :
	ans = 1010000 
else :
	ans = 101
print(ans)

Submission status: Wrong Answer

Solution code:
d,n = map(int,input().split())
if n == 100:
    print(101 * (100**d))
else:
    print(n * (100**d))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if N != 100:
    out = N*(100**D)
    print out
else:
    out = (N+1)*(100**D)
    print out

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d, n = map(int, input().split())
if d==0:
    ans=n
    if n==100:
        n=101
else:
    ans=(100**d)*n
    if n==100:
        ans=100**d*101

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D, N = [int(i) for i in input().split()]
ans = 0
if D == 0 :
	ans = N
else:
	ans = N*(100**D)
print(ans)

Submission status: Wrong Answer

Solution code:
ip = input().split()
usdata = []
D = int(ip[0])
N = int(ip[1])
flag = 0

b_number = 100 ** D
a_number = b_number * N
tester = a_number % 100 ** (D + 1)

if tester == 0:
    a_number += 100 ** D

print(a_number)

Submission status: Wrong Answer

Solution code:
d, n = map(int, input().split())
if d != 0 and d != 1 and d != 2:
    print("Invalid numbers are entered.")
elif n <= 0 or n >= 101:
    print("Invalid numbers are entered.")
else:
    list = []
    for i in range(100):
        list.append(100**d * (i + 1))
    print(list[n - 1])

Submission status: Wrong Answer

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

if d > 0:
	ans = 100**d*n
else:
	ans = n
print ans

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if a[0] == 0:
    wk = 1 * a[1]
    print(wk)
elif a[0] == 1:
    wk = int,pow(100,1) * a[1]
    print(wk)
elif a[0] == 2:
    wk = int,pow(100,2) * a[1]
    print(wk)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d, n = map(int, input().split())
if d == 0:
   for i in range(1, n+1):
      ans = i
   print(ans)
elif d == 1:
   for i in range(1, n+1):
      ans = i * 100
   print(ans)
elif d == 2:
   for i in range(1, n+1):
      ans = i * 10000
   print(ans)

Submission status: Wrong Answer

Solution code:
d, n = list(map(int, input().split()))
if 0 <= d and d <= 2 and 0 <= n and n <= 100:
    print(str(100 ** d * n))

Submission status: Wrong Answer

Solution code:
d,n = map(int, input().split())
print((100**d)*n)

Submission status: Wrong Answer

Solution code:
#-*- coding: utf-8 -*-
# １００でちょうどD回割り切れる正の整数のうちN番目に小さいものを求める
D, N = map(int, input().split())
# D = 0, 1, 2のいずれか
# N は1以上100以下の整数
if N != 100:
    print(100 ** D * (N+1))
else:
    print(100 ** D * (N +1))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ans = "Yey!"

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())
if D == 0:
    print(N)
elif D == 1:
    print(N * 100 )
else:
    print(N * 10000)

Submission status: Wrong Answer

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

if a[0] == 0:
    wk = 1 * a[1]
    print(wk)
elif a[0] == 1:
    wk = 100 * a[1]
    print(wk)
elif a[0] == 2:
    wk = 10000 * a[1]
    print(wk)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split(' '))

if N == 100:
    print(pow(100, D) * 100 + pow(100, D))
    exit()
print(pow(100, D) * N)

Submission status: Wrong Answer

Solution code:
input_line = map(int, raw_input().split())
D = input_line[0]
N = input_line[1]
N = N + 1 if N == 100 else N
gift = 100 ** D * N
print gift

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())
if N == 100:
    ans = pow(100,D) * 101
else :
     ans = pow(100,D) * N
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
if __name__ == "__main__":
    D, N = list(map(int, (input().split(' '))))
    print(pow(100, D) * N)

Submission status: Wrong Answer

Solution code:
D, N = map(int,input().split())
if D==0 and N<100:
  print(N)
elif D==0 and N==100:
  print(N-1)
elif D==1 and N<100:
  print(100*N)
elif D==1 and N==100:
  print(100*N-1)
elif D==2 and N<100:
  print(10000*N-1)
elif D==2 and N==100:
  print(10000*N-1)

Submission status: Wrong Answer

Solution code:
d,n = [int(i) for i in input().split()]
if n == 100:
    ans = 100**d*(n+1)
else:
    ans =  100**d*n
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
number = input()
a = number.split()

D=int(a[0])
N=int(a[1])

if D==0:
    print(N)
elif D==1:
    answer = 100*N
    print(answer)
elif D==2:
    answer = 10000*N
    print(answer)

Submission status: Wrong Answer

Solution code:
D, N = input().split()
ans = 100 ** int(D) * int(N)
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
list=input().rstrip().split() 
D=int(list[0]) 
N=int(list[1])
if N!=100:
    print((100**D)*N)
else:
    print(101*(100**D))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
if a+b<=16:
	print("yay" if a<=8 and a>=1 and b>=1 and b<=8 else ":(")

Submission status: Wrong Answer

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

if a > b:
    tmp = a
    a = b
    b = tmp

r = 16 - 2 * a
b = b - a

if r // 2 >= b:
    print('Yay!')
else:
    print(':')

Submission status: Wrong Answer

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

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

else:
  print(":(")

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())
if D == 0:
    if N == 100:
        print(101)
    else:
        print(N)
elif D == 1:
    print(100 * N)
else:
    print(10000 * N)

Submission status: Wrong Answer

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

if a < b:
    tmp = a
    a = b
    b = tmp

r = 16 - 2 * a
b = b - a

if r // 2 >= b:
    print('Yay!')
else:
    print(':')

Submission status: Wrong Answer

Solution code:
ui = input()

D, N = int(ui.split()[0]), int(ui.split()[1])

print(100**D*(N + int(N/100)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
D, N = map(int,input().split())
print(N*100**D)

Submission status: Wrong Answer

Solution code:
number = input()
a = number.split()

A=int(a[0])
B=int(a[1])

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

Submission status: Wrong Answer

Solution code:
d,n = map(int,input().split())
cnt = 0

for i in range(1,10000):
    ans = (100 ** d) * i
    cnt += 1
    if cnt == n:
        print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
a, b = (int(i) for i in input().split(' '))

if a+b == 16:
    print('Yay!')
elif (a <= 5) & (b <= 5):
    print('Yay!')
else:
    print(':(')

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
k=min(a,b)
p=max(a,b)
if k+(p-k)//2<=8:
	print("Yay!")
else:
	print(":(")

Submission status: Wrong Answer

Solution code:
l = raw_input().split()

A = l[0]
B = l[1]

print A
print B

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

else:
    print ":("

Submission status: Wrong Answer

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

tmp = input()
a = int(tmp.split(" ")[0])
b = int(tmp.split(" ")[1])

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

else:
    print(":)")

Submission status: Wrong Answer

Solution code:
D, N = map(int, input().split())

print(N*(100**D))

Submission status: Wrong Answer

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

if a+b <= 16:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

big = max((a,b))
small = min((a,b))

if((16-small) >= (big-small)*2):
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

import calendar as cal

i = input().split(' ')
a = int(i[0])
b = int(i[1])

if a >= b:
    l = a
    s = b
else:
    l = b
    s = a

d = l - s

e = 16 - s

if e/2 >= d:
    print("Yay!")
else:
    print(":(")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations

sys.setrecursionlimit(10000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    if A <= 6 and B <= 6:
        return 'Yay!'
    else:
        return ':('


def main():
    # A = read_int()
    # B = read_int()
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = a + b

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

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

Submission status: Wrong Answer

Solution code:
A, B = map(int, input().split())
count = 0
for i in range(16):
  if count == 0:
    A -= 1
  else:
    B -= 1
if A <= 0 and B <= 0:
	print('Yay!')
else:
  print(':(')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

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

Submission status: Wrong Answer

Solution code:
inp = input().split()

a = int(inp[0])
b = int(inp[1])

if a>8 and b>8:
    print(':(')

else:
    print('Yay!')

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 998244353
dd = [(0,-1),(1,0),(0,1),(-1,0)]
ddn = [(0,-1),(1,-1),(1,0),(1,1),(0,1),(-1,-1),(-1,0),(-1,1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b = LI()
    if a+b <= 16:
        return 'Yay!'
    return ':('


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

Submission status: Accepted

Solution code:
import sys
import math

#https://atcoder.jp/contests/agc008/submissions/15248942
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

A,B = inm()

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 print(':(')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, b = Input()
    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 <= 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:
l = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# import sys
# sys.recursionlimit(10**7)
from functools import reduce


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

def main():
    a,b = map(int,input().split())
    print('{}'.format(solve(a,b)))




if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = [int(x) for x in input().split()]
print(["Yay!", ":("][a > 8 or b > 8])

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(":(" if 8<max(A,B) 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())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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!"][max(a,b)<9])

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:
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    A, B = list(map(int, input().split()))

    return A, B


def main(A: int, B: int) -> None:
    """
    メイン処理.

    Args:\n
        A (int): 切れ(1 <= A <= 16)
        B (int): 切れ(1 <= B <= 16)
    """
    # 求解処理
    ans = str()
    if (A <= 8) and (B <= 8):
        ans = "Yay!"
    else:
        ans = ":("

    # 結果出力
    print(ans)


if __name__ == "__main__":
    # 標準入力を取得
    A, B = get_input()

    # メイン処理
    main(A, B)

Submission status: Accepted

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

# 求解処理
ans = str()
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:
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 9>max(a,b) 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 or b > 8:
    print(':(')
else:
    print('Yay!')