Harryxun/stf_run huggingface dataset:
a, b, c = input().split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO)


### FIXED CODE ###

a, b, c = input().split()
num = a + b + c
num = int(num)
if num % 4 == 0:
  print("YES")
else:
  print("NO")
def BFS(s, r):
    d[s] = r
    for i in range(1, n+1):
        if G[s][i] == 1 and flag[i] == 0:
            BFS(i, r+1)

n = int(raw_input())
G = [[0 for i in range(n+1)] for j in range(n+1)]
d = [-1 for i in range(n+1)]

for i in range(n):
    v = map(int, raw_input().split())
    for j in range(v[1]):
        G[v[0]][v[2+j]] = 1

flag = [0 for i in range(n+1)]
BFS(1, 0)

for i in range(1, n+1):
    print(str(i) + " " + str(d[i]))

### FIXED CODE ###

n = int(raw_input())
G = [[0 for i in range(n+1)] for j in range(n+1)]
d = [-1 for i in range(n+1)]

for i in range(n):
    v = map(int, raw_input().split())
    for j in range(v[1]):
        G[v[0]][v[2+j]] = 1

flag = [0 for i in range(n+1)]
tn = [[0 for i in range(n+1)] for j in range(n+1)]
tn[0][1] = 1
r = 0
for i in range(n):
    for j in range(1, n+1):
        if flag[j] == 0 and tn[i][j] == 1:
            flag[j] = 1
            d[j] = r
            for k in range(1, n+1):
                if G[j][k] == 1:
                    tn[i+1][k] = 1
    r += 1

for i in range(1, n+1):
    print(str(i) + " " + str(d[i]))
n=int(input())
if n==111:
    print(999)
if n==119:
    prit(991)
if n==191:
    print(919)
if n==199:
    print(911)
if n==911:
    print(199)
if n==919:
    print(191)
if n==991:
    print(119)
if n==999:
    print(111)


### FIXED CODE ###

n=int(input())
if n==111:
    print(999)
elif n==119:
    print(991)
elif n==191:
    print(919)
elif n==199:
    print(911)
elif n==911:
    print(199)
elif n==919:
    print(191)
elif n==991:
    print(119)
elif n==999:
    print(111)
a,b,c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
while true:
  c=c-b
  if c<=0:
    print("Yes")
    break
  a=a-d
  if a<=0:
    print("No")
    break

### FIXED CODE ###

a,b,c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
e=0
while e==0:
  c=c-b
  if c<=0:
    print("Yes")
    break
  a=a-d
  if a<=0:
    print("No")
    break
n=int(input())
a1=[int(input()) for i in range(n)]
a2=[int(input()) for i in range(n)]
a=[a1,a2]
s=a[0][0]
t=sum(a1)
u=sum(a2)
for i in range(1,n):
  if t-a[0][0]>=u:
    s=s+a[0][i]
    t=t-a[0][i]
    u=u-a[1][i-1]
  else:
    s=s+sum(a2[(i-1):n])
print(s)

### FIXED CODE ###

n=int(input())
a=list(list(map(int,input().split())) for i in range(2))
s=0
for i in range(n):
  s=max(s,sum(a[0][0:i+1])+sum(a[1][i:n]))
print(s)
a,b=int(input().split())            
if 1<=a and b<=10000:               
    if (a*b)%2==0:                  
        print('Even')               
    else:                           
        print('Odd')                

### FIXED CODE ###

a, b = map(int, input().split())  
if 1<=a and b<=10000:             
    if (a*b)%2==0:                
        print('Even')             
    else:                         
        print('Odd')
def solve(a,b,c,turn):
	if turn == "a":
		if a == "":
			return "A"
		else:
			next_turn = a[0]
			a = a[1:]
	elif turn == "b":
		if b == "":
			return "B"
		else:
			next_turn = b[0]
			b = b[1:]
	else
		if c == "":
			return "C"
		else:
			next_turn = c[0]
			c = c[1:]
	return solve(a,b,c, next_turn)
a=input().strip()
b=input().strip()
b=input().strip()
print(solve(a,b,c,"a"))

### FIXED CODE ###

def solve(a,b,c,turn):
	if turn == "a":
		if a == "":
			return "A"
		else:
			next_turn = a[0]
			a = a[1:]
	elif turn == "b":
		if b == "":
			return "B"
		else:
			next_turn = b[0]
			b = b[1:]
	else:
		if c == "":
			return "C"
		else:
			next_turn = c[0]
			c = c[1:]
	return solve(a,b,c, next_turn)
a=input().strip()
b=input().strip()
c=input().strip()
print(solve(a,b,c,"a"))
N, W = map(int, input().split())
item = [[0] * 2 for _ in range(N)]
for i in range(N):
    w, v = map(int, input().split())
    item[i][0], item[i][1] = w, v
dp = [[0] * (W+1) for _ in range(N+1)]
for n in range(1, N+1):
    for w in range(W+1):
        if item[n-1][0] <= w:
            dp[n][w] = max(dp[n-1][w], dp[n-1][w-item[n-1][0]] + item[n-1][1])
        else:
            dp[n][w] = dp[n-1][w]
print(dp[N][W])

### FIXED CODE ###

N, W = map(int, input().split())
item = [[0] * 2 for _ in range(N)]
for i in range(N):
    w, v = map(int, input().split())
    item[i][0], item[i][1] = w, v
dp = [[1000000001] * (1000*N+1) for i in range(N+1)]
dp[0][0] = 0
for i in range(1, N+1):
    for j in range(1000*N+1):
        if item[i-1][1] <= j:
            dp[i][j] = min(dp[i-1][j-item[i-1][1]] + item[i-1][0], dp[i-1][j])
        else:
            dp[i][j] = dp[i-1][j]
ans = 0
for i in range(1000*N+1):
    if dp[N][i] <= W:
        ans = i
print(ans)
R

### FIXED CODE ###

import math

R = int(input())

print(R * 2 * math.pi)
n=int(input())
a=list(map(int,input().split()))
ans=1
c=[0,0,0]
for i in range(n):
  ans*=c.count(a[i])
  c[c.index(a[i])]+=1
print(ans%1000000007)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
ans=1
c=[0,0,0]
for i in range(n):
  if a[i] not in c:
    ans=0
  else:
    ans*=c.count(a[i])
    ans%=1000000007
    c[c.index(a[i])]+=1
print(ans)
N, M = map(int, input().split())
G = dict([[i, []] for i in range(N)])
for _ in range(M):
    x, y = map(int, input().split())
    G[x-1].append(y-1)

dp = [-1] * N


def rec(v):
    if dp[v] >= 0:
        return dp[v]
    if len(G[v]) == 0:
        return 0

    ret = -1
    for nv in G[v]:
        ret = max(ret, rec(nv) + 1)

    return ret


print(max([rec(v) for v in range(N)]))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)
N, M = map(int, input().split())
G = dict([[i, []] for i in range(N)])
for _ in range(M):
    x, y = map(int, input().split())
    G[x-1].append(y-1)

dp = [-1] * N


def rec(v):
    if dp[v] >= 0:
        return dp[v]
    if len(G[v]) == 0:
        return 0

    ret = -1
    for nv in G[v]:
        ret = max(ret, rec(nv) + 1)

    dp[v] = ret
    return ret


print(max([rec(v) for v in range(N)]))
n=int(input())
h=list(map(int,input().split()))
def dp(i):
    if i>=n-1:
        return 0
    elif i==n-2:
        return dp(i+1)+abs(h[i]-h[i+1])
    else:
        return min(dp(i+1)+abs(h[i]-h[i+1]),dp(i+2)+abs(h[i]-h[i+2]))
print(dp(0))

### FIXED CODE ###

N = int(input())
H = list(map(int,input().split()))
 
dp = [0]*N
dp[1] = abs(H[0] - H[1])
for i in range(2,N):
    dp[i] = min(dp[i-2] + abs(H[i-2]-H[i]), dp[i-1] + abs(H[i-1]-H[i]))
print(dp[-1])
x = int(input())

if x % 2 == 0:
  print(int((x//2)**2))
else:
  print(int((x//2)*((x//2)+1))


### FIXED CODE ###

x = int(input())

if x % 2 == 0:
  print(int((x//2)**2))
else:
  print(int((x//2)*((x//2)+1)))
def abc(abc, dp):
    return [abc[0] + max(dp[1], dp[2]),
            abc[1] + max(dp[0], dp[2]),
            abc[2] + max(dp[0], dp[1])]

N = int(input())
abcList = [list(map(int, input().split())) for i in range(N)]
dp = [abcList[0]]

if len(abcList) == 1:
    print(max(abcList[0][0], abcList[0][1], abcList[0][2]))
    return

dp.append(abc(abcList[1], dp[0]))

for i in range(2, N):
    dp.append(abc(abcList[i], dp[i-1]))
print(max(dp[-1]))

### FIXED CODE ###

N = int(input())
abcList = [list(map(int, input().split())) for i in range(N)]
dp = [abcList[0]]

if len(abcList) == 1:
    print(max(abcList[0][0], abcList[0][1], abcList[0][2]))
else:
    for i in range(1, N):
        dp.append([abcList[i][0] + max(dp[i - 1][1], dp[i - 1][2]),
                   abcList[i][1] + max(dp[i - 1][0], dp[i - 1][2]),
                   abcList[i][2] + max(dp[i - 1][0], dp[i - 1][1])])
    print(max(dp[-1]))
import itertools
n = int(input())
a = list(map(int, input().split()))
idList = [i for i in range(1, n+1)]
temp = 0
for i in range(n):
    tar = a[temp]
    if (tar >= n):
        del a[i]
        del idList[i]

    else:
        temp += 1

com = list(itertools.combinations(idList, 2))

num = len(com)
ans = 0
for i in range(num):
    aa = com[i]
    # print(aa)
    idA = aa[0]
    idB = aa[1]
    dif = abs(idA - idB)
    indexA = idList.index(idA)
    indexB = idList.index(idB)

    height = a[indexA] + a[indexB]

    if (height == dif):
        ans += 1

print(ans)


### FIXED CODE ###

from collections import Counter
N = int(input())
A = list(map(int, input().split()))

minus = [0] * N
plus = [0] * N

for i in range(N):
    minus[i] = (i + 1) - A[i]
    plus[i] = (i + 1) + A[i]

count = Counter(minus)
most = count.most_common()
num = len(most)

countPP = Counter(plus)
#mostPP = countPP.most_common()
#check = mostPP[:][0]
ans = 0

for i in range(num):
    elm = most[i]
    fir = elm[0]
    sec = elm[1]
    # if (fir in check):

    aa = countPP[fir]
    #    print(aa)
    ans += aa * sec

    # try countPP[tar]:

print(ans)
import math

NUM = 10 ** 9 + 7

N, K = map(int, input().split())


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


for i in range(1, K + 1):
    print((comb(N - K + 1, i) * comb(K - 1, i - 1)) % NUM)


### FIXED CODE ###

import math

NUM = 10 ** 9 + 7

N, K = map(int, input().split())


def comb(a, b):
    return math.factorial(a) // (math.factorial(a - b) * math.factorial(b))


c = N - K + 1
d = K - 1
for i in range(1, K + 1):
    if c < i:
        print(0)
    else:
        print((comb(c, i) * comb(d, i - 1)) % NUM)
import sys
import io
#sys.stdin = io.StringIO(input_string)
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline

def resolve():
	from collections import deque
	
	n, q = map(int, input().split())
	adj = [[] for i in range(n+1)]
	for i in range(n-1):
		a, b = map(int, input().split())
		adj[a-1].append(b-1)
		adj[b-1].append(a-1)
	ans = [0 for i in range(n)]
	for i in range(q):
		p, x = map(int, input().split())
		p -= 1
		ans[p] += x
#	print(f"{adj=}\n{ans=}")

	def dfs(now, prv):
		for next in adj[now]:
#			print(f"{now=}, {next=}")
			if nextinput = sys.stdin.readline == prv:
				continue
			ans[next] += ans[now]
			dfs(next, now)

	dfs(0, 0)
	print(*ans)

resolve()

### FIXED CODE ###

import sys
import io
#sys.stdin = io.StringIO(input_string)
sys.setrecursionlimit(10 ** 6)
def input():
    return sys.stdin.readline()[:-1]
    
def resolve():
	from collections import deque
	
	n, q = map(int, input().split())
	adj = [[] for i in range(n+1)]
	for i in range(n-1):
		a, b = map(int, input().split())
		adj[a-1].append(b-1)
		adj[b-1].append(a-1)
	ans = [0 for i in range(n)]
	for i in range(q):
		p, x = map(int, input().split())
		p -= 1
		ans[p] += x
#	print(f"{adj=}\n{ans=}")

	def dfs(now, prv):
		for next in adj[now]:
#			print(f"{now=}, {next=}")
			if next == prv:
				continue
			ans[next] += ans[now]
			dfs(next, now)

	dfs(0, 0)
	print(*ans)

resolve()
from collections import defaultdict

n, m = [int(i) for i in raw_input().split()]

parents = defaultdict(list)

i = 0
while i < m:
    u, v = [int(x) for x in raw_input().split()]
    parents[v-1].append(u-1)
    i += 1

def calc_f(parents, f, i):

    if f[i] != -1:
        return f[i]

    f[i] = 0
    for v in parents[i]:
        f[i] = max(f[i], calc_f(parents, f, v)+1)

    return f[i]

f = [-1] * n
j = 0
while j < n:
    calc_f(parents, f, j)
    j += 1

if not f:
    print 0
else:
    print max(f)

### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)

n, m = [int(i) for i in raw_input().split()]
parents = defaultdict(list)

i = 0
while i < m:
    u, v = [int(x) for x in raw_input().split()]
    parents[v-1].append(u-1)
    i += 1

def calc_f(parents, f, i):
    if i < 0 or i >= len(f):
        return 0

    if f[i] != -1:
        return f[i]

    f[i] = 0
    for v in parents[i]:
        f[i] = max(f[i], calc_f(parents, f, v)+1)

    return f[i]

f = [-1] * n
j = 0
while j < n:
    calc_f(parents, f, j)
    j += 1

if len(f) == 0:
    print 0
else:
    print max(f)
A, B = map(int,input().split())

min8 = (A * 25 + 1) // 2 
max8 = ((A+1) * 25 - 1) // 2
min10 = A * 10
max10 = (A+1) * 10 - 1

if min10 > max8 or min8 > mix10:
	print(-1)
else:
	print(min[min8, min10])


### FIXED CODE ###

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

min8 = (A * 25 + 1) // 2 
max8 = ((A+1) * 25 - 1) // 2
min10 = B * 10
max10 = (B+1) * 10 - 1

if min10 > max8 or min8 > max10:
	print(-1)
else:
	print(max([min8, min10]))
ans = 0
for i in range(1, n):
    if 0 != i%3 and 0 != i%5:
        ans += i
print(ans)

### FIXED CODE ###

n = input()
if "7" in str(n):
    print("Yes")
else:
    print("No")
N, X = map(int, input().split())
bager = []
bager.append("P")

for i in range(1, N+1):
    bagernow = "B" + bager[i-1] + "P" + bager[i-1] + "B"
    bager.append(bagernow)

bagerN = str(bager[N])

runbager = bagerN[:(X)]

Ans = runbager.count("P")

print(Ans)

### FIXED CODE ###

D = int(input())

if D == 25:
    print("Christmas")

elif D == 24:
    print("Christmas Eve")

elif D == 23:
    print("Christmas Eve Eve")

elif D == 22:
    print("Christmas Eve Eve Eve")
import numpy as np

N = int(input())
A_i = np.array(list(map(int, input().split())))
stu = [[nums+1,student] for nums, student in enumerate(A_i)]

hh = np.full(N, np.nan)
for i, j in stu:
    hh[j-1] = i
    
for i in hh:
  print(i)

### FIXED CODE ###

import numpy as np

N = int(input())

nums_list = np.arange(1,N+1)
odd_list = nums_list[nums_list%2==1]
print(len(odd_list)/len(nums_list))
x = input()
y = input()
sum = x*y
around = 2*x+2*y
input int(sum around)


### FIXED CODE ###

a,b=[int(x) for x in input().split()]
print(a*b,(a+b)*2)
N, K = map(int, input().split())
*T, = map(int, input().split())

INF = float("inf")  # pythonでの無限大の作り方
DP = [INF for i in range(N)]

def chmin(a, b):
     if a > b:
          return b
     return a

DP[0] = 0
for i in range(1, N):
    for j in range(1, K+1):
        DP[i+j] = chmin(DP[i+j], DP[i] + abs(T[i+j] - T[i]))

print(int(DP[-1]))

### FIXED CODE ###

import sys
import numpy as np

input = sys.stdin.readline

N, K = map(int, input().split())
*T, = map(int, input().split())

INF = float("inf")  # pythonでの無限大の作り方
DP = [INF for i in range(N)]

def chmin(a, b):
     if a > b:
          return b
     return a

DP[0] = 0
"""
# 2重for文ではTLE
for i in range(1, N):
    for j in range(1, K+1):
        if i-j >= 0:
            DP[i] = chmin(DP[i], DP[i-j] + abs(T[i-j] - T[i]))
"""
"""
# list内包表記でもTLE (2重for文よりはマシ)
for i in range(1, N):
    DP[i] = min([chmin(DP[i], DP[i-j] + abs(T[i-j] - T[i])) for j in range(1, K+1) if i-j >= 0])
"""

DP = np.zeros(N, dtype=int)
T = np.array(T)

for i in range(1, N):
    start = max(0, i-K)
    DP[i] = min(DP[start:i] + np.abs(T[i] - T[start:i]))

print(int(DP[-1]))
n = int(input())
a_list = list(map(int, input().split()))
flag = “ok”
for i in a_list:
  if i%2 == 0: 
    if i%3 != 0 or i%5 != 0:
      flag = “ng”
if flag == “ok”
  print(“APPROVED”) 
else:
  print(“ DENIED”)

### FIXED CODE ###

n = int(input())
a_list = list(map(int, input().split()))
flag = "ok"
for i in a_list:
  #print(i)
  if i%2 == 0: 
    if i%3 != 0 and i%5 != 0:
      flag = "ng"
if flag == "ok":
  print("APPROVED") 
else:
  print("DENIED")
s = input()
t = set()
for i in range(len(s)):
  t.add(s[i])
o = list(t)
o.sort()
u = 'qwertyuiopasdfghjklzxcvbnm'
v = []
for i in range(len(u)):
  v.append(u[i])
v.sort()
now = 0
for i in range(26):
  if o[i] == v[i]:
    now += 1
  else:
    print(v[now])
    break
else:
  print('None')

### FIXED CODE ###

s = input()
t = set()
for i in range(len(s)):
  t.add(s[i])
o = list(t)
o.sort()
u = 'qwertyuiopasdfghjklzxcvbnm'
v = []
for i in range(len(u)):
  v.append(u[i])
v.sort()
now = 0
if len(o) == 26:
  print('None')
else:
  for i in range(26):
    if i >= len(t):
      print(v[i])
      break
    elif o[i] == v[i]:
      now += 1
    else:
      print(v[now])
      break
S=map(int,raw_input().split())
h=S/3600
S=S%3600
r=S/60
s=S%60
print h:r:s

### FIXED CODE ###

S=input()
h=S/3600
r=S%3600/60
s=S-h*3600-r*60
print str(h)+':'+str(r)+':'+str(s)
a = int(input())
for i in range (1,10):
    if a % i == 0 and a/i < 10:
        print('Yes')
        exit()

print('No')

### FIXED CODE ###

a,b = map(int,input().split())
if a <= 9 and b <= 9:
    print(a*b)
else:
    print(-1)
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n = int(input())
a = [int(item) for item in input().split()]
b = [int(item) for item in input().split()]

if n == 1:
    if a[0] == b[0]:
        print("No")
    else:
        print(*b)
        
left = 0
lv = b[0]
for i in range(n):
    if b[i] != lv:
        right = i
        break

for i in range(n - 1):
    if a[i] != b[i]:
        left += 1
        if right == left:
            right += 1
    else:
        if a[i] == b[right]:
            while b[right] == a[i]:
                right += 1
                if right == n:
                    print("No")
                    exit()
        b[i], b[right] = b[right], b[i]
        left += 1
        if right == left:
            right += 1

if a[-1] != b[-1]:
    print(*b)
    exit()
if a[-2] != b[-1] and a[-1] != b[-2]:
    b[-1], b[-2] = b[-2], b[-1]
    print(*b)
    exit()
print("No")

### FIXED CODE ###

#!/usr/bin/env python3
import sys
input = sys.stdin.readline
import random

n = int(input())
a = [int(item) for item in input().split()]
b = [int(item) for item in input().split()]
# n = 10
# a = []
# b = []
# for _ in range(10):
#     a.append(random.randrange(1, 4))
#     b.append(random.randrange(1, 4))
# a.sort()
# b.sort()
# print(*a)
# print(*b)

b.reverse()

same_val = None
same_id = []
for i, (ai, bi) in enumerate(zip(a, b)):
    if ai == bi:
        same_val = ai
        same_id.append(i)

changeable = []
for i, (ai, bi) in enumerate(zip(a, b)):
    if b[i] != same_val and a[i] != same_val:
        changeable.append(i)

if len(same_id) > len(changeable):
    print("No")
    exit()
for s, c in zip(same_id, changeable):
    b[s], b[c] = b[c], b[s]

print("Yes")
print(*b)
a = int(input())
print(a + a**2 + a**3

### FIXED CODE ###

a = int(input())
sum_a = a + a ** 2 + a ** 3
print(sum_a)
from math import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = int(res * t /(gcd(res, t)))
print(res)

### FIXED CODE ###

from fractions import gcd

N = int(input())
T = []
for i in range(N):
  T.append(int(input()))

res = 1
for t in T:
  res = res // gcd(res, t) * t
print(res)
#!/usr/bin/env python3

S = list(input())
T = list(input())

if len(T) == len(S) + 1:
    flag = True
    for i in len(S):
        if S[i] != T[i]:
            flag = False
    if flag:
        print('Yes')
    else:
        print('No')
else:
    print('No')


### FIXED CODE ###

#!/usr/bin/env python3

S = list(input())
T = list(input())

if len(T) == len(S) + 1:
    flag = True
    for i in range(len(S)):
        if S[i] != T[i]:
            flag = False
    if flag:
        print('Yes')
    else:
        print('No')
else:
    print('No')
N=int(input())
S=str(input())

list=[]

for i in range(N-1):
    if S[i]=='A' and S[i+1]=='B' and S[i+2]=='C':
        list.append(i)
print(len(list))

### FIXED CODE ###

N = int(input())
S = input()
cnt = 0

for i in range(N):
    if S[i] == 'C' and S[i - 1] == 'B' and S[i - 2] == 'A':
        cnt += 1
print(cnt)
a,b=map(int,input.split())
if a<b:
    print("a<b")
elif a>b:
    print("a>b")
else:
    print("a==b")

### FIXED CODE ###

a,b=map(int,input().split())
if a<b:
    print ("a < b")
elif a>b:
    print ("a > b")
else:
    print ("a == b")
s = int(input())
w = int(input())

if w >= s:
    print("unsafe")
else:
    print("safe")

### FIXED CODE ###

s, w = map(int, input().split())

if w >= s:
    print("unsafe")
else:
    print("safe")
import fractions
A, B = map(int, input().split())
GCD = fractions.gcd(A, B)
E = [1] * (GCD + 1)
E[0], E[1] = 0, 0
P = []
for i, e in enumerate(E):
  if e == 0:
    continue
  P.append(i)
  for j in range(i, GCD + 1, i):
    E[j] = 0
print(len([p for p in P if GCD % p == 0]) + 1)

### FIXED CODE ###

import fractions
A, B = map(int, input().split())
GCD = fractions.gcd(A, B)
k = 1
cnt = 1
while GCD > 1:
  k += 1
  if k ** 2 > GCD:
    cnt += 1
    break
  if GCD % k:
    continue
  cnt += 1
  while GCD % k == 0:
    GCD //= k
print(cnt)
package main

import (
	"fmt"
)

func main(){
	var a, b int
	fmt.Scan(&a, &b)
	fmt.Println(a*b, 2*(a+b))
}


### FIXED CODE ###

a, b = [int(i) for i in input().split()]
print(a*b, 2*(a+b))
N, P = map(int, input().split())
if N == 1:
  print(P)
  exit()
if N > 40:
  print(1)
  exit()
res = []
for i in range(1,P):
  x = i**N
  if i**N > P:
    break
  if P%x == 0:
    res.append(i)
print(max(res))

### FIXED CODE ###

N, P = map(int, input().split())
if N == 1:
  print(P)
  exit()
if N > 40:
  print(1)
  exit()
res = []
for i in range(1,P+1):
  x = i**N
  if i**N > P:
    break
  if P%x == 0:
    res.append(i)
print(max(res))
for _ in range(N):
    A.append(int(input()))

sort_A = sorted(A)
max = sort_A[N - 1]
sec = sort_A[N - 2]

count = A.count(max)

if count == 1:
  p = A.index(max)
  
  for i in range(p):
    print(max)
  
  print(sec)
  
  for j in range(p,N - 1):
    print(max)

else:
  for k in range(N):
    print(max)

### FIXED CODE ###

N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))

sort_A = sorted(A)
max = sort_A[N - 1]
sec = sort_A[N - 2]

count = A.count(max)

if count == 1:
  p = A.index(max)
  
  for i in range(p):
    print(max)
  
  print(sec)
  
  for j in range(p,N - 1):
    print(max)

else:
  for k in range(N):
    print(max)
ans = True
d = [(0,1),(0,-1),(1,0),(-1,0)]
for y in range(H):
    for x in range(W):
        if s[y][x] == "#":
            for dy, dx in d:
                ny = y + dy
                nx = x + dx
                if ny<0 or H<=ny or nx<0 or W<=nx:
                    continue
                if s[ny][nx]=="#":
                    break
            else:
                ans = False
print("Yes" if ans else "No")

### FIXED CODE ###

H, W = map(int, input().split())
s = list(list(input()) for _ in range(H))
ans = True
d = [(0,1),(0,-1),(1,0),(-1,0)]
for y in range(H):
    for x in range(W):
        if s[y][x] == "#":
            for dy, dx in d:
                ny = y + dy
                nx = x + dx
                if ny<0 or H<=ny or nx<0 or W<=nx:
                    continue
                if s[ny][nx]=="#":
                    break
            else:
                ans = False
print("Yes" if ans else "No")
n = int(input())

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

for A in range(n):
    if A == A/3 or A == A/5:
        print("APPROVED")
    else:
        print("DENIED")

### FIXED CODE ###

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

if a==b and a!=c:
    print("Yes")
elif a==c and a!=b:
    print("Yes")
elif b==c and b!=a:
    print("Yes")
else:
    print("No")
import math
n = int(raw_input())
ls = [int(raw_input() for i in range(n)]
r = max(ls)+1
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
    if p[i]:
        p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]
   
ans = 0
for i in ls:
    ans += p[i-1]
print ans

### FIXED CODE ###

def isPrime(p):
	if p == 2: return 1
	if p < 2 or p&1 == 0: return 0
	return 1 if pow(2,p-1,p) == 1 else 0
	
n = int(raw_input())
print sum(isPrime(int(raw_input())) for i in range(n))
s = [int(input()) for i in range(3)]
n = s[0]
a = n[1]
b = n[2]
c = n-a
d = int(c/b)
print(c-b*d)

### FIXED CODE ###

s = [int(input()) for i in range(3)]
n = s[0]
a = s[1]
b = s[2]
c = n-a
d = int(c/b)
print(c-b*d)