Harryxun/stf_run huggingface dataset:
def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    m = n
    sumM = 0
    while m > 0:
        sumN += (m % 10)
        m /= 10

    if n % sumM == 0:
        print("Yes")
    else:
        print("No")
resolve()


### FIXED CODE ###

def resolve():
    # 整数 1 つ
    n = int(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    m = n
    sumM = 0
    while m >= 1:
        sumM += (m % 10)
        m = m // 10
#        print(m)
#    sumM += m
#    print(sumM)

    if n % sumM == 0:
        print("Yes")
    else:
        print("No")
resolve()
a, b = tuple([int(x) for x in input().split()])
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else
    print("a == b")
    

### FIXED CODE ###

a, b = tuple([int(x) for x in input().split()])
if a < b:
    print("a < b")
elif a > b:
    print("a > b")
else:
    print("a == b")
n = int(input())
m = int(input())

if m == n:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n,m = map(int, input().split())

if m == n:
  print('Yes')
else:
  print('No')
for _ in range(6):
    a.append(int(input()))
for i in range(6):
    for j in a[i+1:]:
        if abs(a[i]-j) > k:
            print(":(")
            exit()
print("Yay!")

### FIXED CODE ###

a = []
for _ in range(5):
    a.append(int(input()))
k = int(input())
for i in range(5):
    for j in a[i+1:]:
        if abs(a[i]-j) > k:
            print(":(")
            exit()
print("Yay!")
import numpy as np
import itertools
n = int(input())
l = [list(map(int,input().split())) for i in range(n)]
a = np.array(l)
dic = list(itertools.permutations(n,n))
sum = 0
for i in range(len(dic)):
  for j in range(n-1):
    sum += np.linalg.norm(a[dic[i][j]]-a[dic[i][j+1]])
print(sum//len(dic))

### FIXED CODE ###

n = int(input())
a = [list(map(int,input().split())) for i in range(n)]
sum = 0
for i in range(n):
  for j in range(i+1,n):
    sum += ((a[i][0]-a[j][0])**2+(a[i][1]-a[j][1])**2)**0.5
print(2*sum/n)
def main():
	N, K = map(int, input().split())
	DIV = 10**9+7
	ab = [[] for _ in range(N)]

	size = max(N+1, K+1)
	fact = [0]*size
	inverse = [0]*size
	inv_cal = [0]*size
	fact[:2] = [1, 1]
	inverse[:2] = [1, 1]
	inv_cal[:2] = [0, 1]

	for i in range(2, size):
		fact[i] = (fact[i-1]*i%DIV)
		inv_cal[i] = (-inv_cal[DIV%i]*(DIV//i))%DIV
		inverse[i] = inverse[i-1]*inv_cal[i]%DIV

	def C(n, r):
		ans = fact[n]*inverse[r]%DIV
		return ans*inverse[n-r]%DIV

	def P(n, r):
		ans = C(n, r)
		return ans*fact[r]%DIV

	for _ in range(N-1):
		u, v = map(int, input().split())
		ab[u-1].append(v-1)
		ab[v-1].append(u-1)

	def dfs(v, ans=1, p=-1):
		for u in ab[v]:
			if u == p:
				continue
			ans = dfs(u, ans, v)
		c = 0
		nk = K
		if p == -1:
			c = len(ab[v])+1
		else:
			c = len(ab[v])-1
			nk = K-2
		ans *= P(nk, c)
		ans %= DIV
		return ans
	ans = dfs(0)
	print(ans)


if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)

def main():
	N, K = map(int, input().split())
	DIV = 10**9+7
	ab = [[] for _ in range(N)]

	def P(n, r):
		ans = 1
		for i in range(r):
			ans = (ans*(n-i)) % DIV
		return ans

	for _ in range(N-1):
		u, v = map(int, input().split())
		ab[u-1].append(v-1)
		ab[v-1].append(u-1)

	def dfs(v, p=-1):
		c = 0
		ans = 1
		for u in ab[v]:
			if u == p:
				continue
			c += 1
			ans = ans * dfs(u, v) % DIV
		nk = K-1
		if p != -1:
			nk = K-2
		ans *= P(nk, c)
		return ans%DIV
	ans = dfs(0)*K%DIV
	print(ans)


if __name__ == '__main__':
	main()
n, *a = map(int, open(0).read().split())
print(["APPROVED", "DENIED"][sum((i % 3) * (i % 5) for i in a if i % 2 == 0)])

### FIXED CODE ###

n, *a = map(int, open(0).read().split())
print("DENIED" if sum((i % 3) * (i % 5) for i in a if i % 2 == 0) else "APPROVED")
grid = [list(map(int,input().split(' ')))]
    grid.append(list(map(int,input().split(' '))))
    grid.append(list(map(int,input().split(' '))))
     
    flg =False
    for i in range(100):
        b0,b1,b2  = grid[0][0]-i,grid[0][1]-i,grid[0][2]-i
        a1,a2 = grid[1][0]-b0,grid[2][0]-b0
        if grid[1][1] == a1+b1 and grid[1][2] == a1+b2 and grid[2][1] == a2+b1 and grid[2][2] == a2+b2:
            flg =True
            break
        if min([b0,b1,b2]) < 0:
            break
        
    if flg:
        print('Yes')
        

### FIXED CODE ###

grid = [list(map(int,input().split(' ')))]
grid.append(list(map(int,input().split(' '))))
grid.append(list(map(int,input().split(' '))))

flg =False
for i in range(100):
    b0,b1,b2  = grid[0][0]-i,grid[0][1]-i,grid[0][2]-i
    a1,a2 = grid[1][0]-b0,grid[2][0]-b0
    if grid[1][1] == a1+b1 and grid[1][2] == a1+b2 and grid[2][1] == a2+b1 and grid[2][2] == a2+b2:
        if grid[0][0] == i+b0 and grid[0][1] == i+b1 and grid[0][2] == i+b2 and grid[1][0] == a1+b0 and grid[2][0] == a2+b0:
            flg =True
            break
    if min([b0,b1,b2]) < 0:
        break
    
if flg:
    print('Yes')
    
else:
    print('No')
m = map(int,raw_input().split())
for i in range(len(m)+1):
 if(m[i-1]==0):
  break
 print"Case %s* %s",%(i,m[i-1])

### FIXED CODE ###

i=0

while True:
    a = int(input())
    if(a==0):
      break
    i = i+1
    print "Case %d: %d" %  (i,a)
from math import floor
n,k = input().split(" ")

print(floor((n - 1) / (k - 1)))


### FIXED CODE ###

from math import ceil
n,k = map(int,input().split(" "))


print(ceil((n - 1) / (k - 1)))
import sys

read = sys.stdin.read
readline = sys.stdin.readline

N, M, Q, *abcd = map(int, read().split())
cand = [[0, 1]]

for _ in range(M):
    new_cand = []
    for j in cand:
        for k in range(j[-1], M + 1):
            new_cand.append(j[:] + [k])
    cand = new_cand[:]

answer = 0
abcd = tuple(zip(*[iter(abcd)] * 4))
for seq in cand:
    t = 0
    for a, b, c, d in abcd:
        if seq[b] - seq[a] == c:
            t += d

    answer = max(answer, t)

print(answer)


### FIXED CODE ###

import sys

read = sys.stdin.read
readline = sys.stdin.readline

N, M, Q, *abcd = map(int, read().split())
cand = [[0, 1]]

for _ in range(N - 1):
    new_cand = []
    for j in cand:
        for k in range(j[-1], M + 1):
            new_cand.append(j[:] + [k])
    cand = new_cand[:]

answer = 0
abcd = tuple(zip(*[iter(abcd)] * 4))
for seq in cand:
    t = 0
    for a, b, c, d in abcd:
        if seq[b] - seq[a] == c:
            t += d
    answer = max(answer, t)

print(answer)
import math

N = int(input())
P = 0
P += N
Eratosthenes = [p for p in range(2, math.ceil(N ** 0.5))]
number = Eratosthenes[0]
sosuu = []
while number < N ** 0.25:
    sosuu.append(number)
    n_Eratosthenes = []
    for n in Eratosthenes:
        if n % number == 0:
            pass
        else:
            n_Eratosthenes.append(n)
    if len(n_Eratosthenes) == 0:
        break
    number = n_Eratosthenes[0]
    Eratosthenes = n_Eratosthenes
numbers = sosuu + Eratosthenes
suuji = 0
answers = []
while N > 1 and suuji < len(numbers):
    number = numbers[suuji]
    if N % number == 0:
        answers.append(number)
        N = N // number
    else:
        suuji += 1
number = 1
for n in answers:
    number *= n
other = P // number
if P==1:
    print(1)
else:
    if other == 1:
        a = 1
        b = 1
        for n in range(len(answers)):
            if n % 2 == 0:
                a *= answers[n]
            else:
                b *= answers[n]
        print(max(len(str(a)), len(str(b))))
    else:
        print(max(len(str(other)), len(str(number))))


### FIXED CODE ###

N=int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
yakusuu=make_divisors(N)
if len(yakusuu)%2 != 0:
    print(len(str(yakusuu[len(yakusuu)//2])))
else:
    ans=pow(10,9)
    for n in range(len(yakusuu)//2):
        number=max(len(str(yakusuu[n])),len(str(yakusuu[-n-1])))
        ans=min(ans,number)
    print(ans)
S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

if 1 <= second_half <= 12 and 1 <= first_half <= 12 :
  print("AMBIGUOUS")
elif 1 <= second_half <= 12 :
    print("YYMM")
elif 1 <= first_half <= 12 :
    print("MMYY")
else: 
    print("NA")

### FIXED CODE ###

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

letters = list(S)
letters[K-1] = letters[K-1].lower()

new_S = ""

for letter in letters:
  new_S += letter
  
print(new_S)
x,y = map(int,input().split())
printint((x+y/2))

### FIXED CODE ###

x,y = map(int,input().split())
print(int(x+y/2))
n = int(input())
a = list(map(int, input().split()))

count = 0
while all(i%2 == 0 for i in a):
    a = [i / 2 for i in a]
    count += 1
print(count)

### FIXED CODE ###

i = input()
print(i.count("1"))
N,M = map(int,input().split())
score = list(map(int,input().split()))
score = sorted(score,reverse=True)
if score[M−１]*4*M < sum(score):
    print("No")
else:
    print("Yes")


### FIXED CODE ###

N,M = map(int,input().split())
score = list(map(int,input().split()))
score = sorted(score,reverse=True)
if score[M-1]*4*M < sum(score):
    print("No")
else:
    print("Yes")
aList[b - 1] = 0


### FIXED CODE ###

import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    n = int(readline().rstrip())
    A = list(map(int, readline().rstrip().split()))
    counter = collections.Counter(A)
    q = int(readline().rstrip())
    BCList = [list(map(int, readline().rstrip().split())) for _ in range(q)]
    aList = [0] * (10**5 + 10)
    sumA = sum(A)
    for i in range(n):
        aList[A[i] - 1] += 1

    for i in range(q):
        b, c = BCList[i][0], BCList[i][1]
        if aList[b - 1] == 0:
            print(sumA)
            continue
        sumA += (c - b) * aList[b - 1]
        aList[c - 1] += aList[b - 1]
        aList[b - 1] = 0
        print(sumA)


if __name__ == '__main__':
    main()
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    dataset = []
    for a in range(1, n + 1):
        for b in range(a + 1, n + 1):
            for c in range(b + 1, n + 1):
                if sum([a,b,c]) == x:
                    count += 1

    print(count)

### FIXED CODE ###

while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == s + m + e:
                    count += 1

    print(count)
N = int(input())
A = list(map(intm input().split()))

print(max(A) - min(A))
  

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
 
# print(max(A) - min(A))

min = A[0]
max = A[0]
for i in range(N):
  if A[i] > max:
    max = A[i]
  if A[i] < min:
    min = A[i]
print(max - min)
from itertools import accumulate
n,x = (int(i) for i in input().split())
l = [int(i) for i in input().split()]
ruiseki = list(accumulate(l))
ruiseki.insert(0,0)
i = 0
#print(ruiseki)
while ruiseki[i] <= x and i < n+1:
    i += 1
print(i)


### FIXED CODE ###

from itertools import accumulate
n,x = (int(i) for i in input().split())
l = [int(i) for i in input().split()]
ruiseki = list(accumulate(l))
ruiseki.insert(0,0)
i = 0
#print(ruiseki)
while i < len(ruiseki) and ruiseki[i] <= x:
    i += 1
print(i)
n=int(input())

if n%2 ==1:
  print(1/2+1/2n)
else:
  print(0.5)

### FIXED CODE ###

n = int(input())

if n%2 ==0:
  print(0.5)
else:
  s=1/2+1/(2*n)
  print(s)
a=int(input())
b=int(input())
c=int(input())
x=int(input())

count=0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*a+100*b+50*c=x:
        count+=1
print(count)

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
x=int(input())

count=0

for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if 500*i+100*j+50*k==x:
        count+=1
print(count)
N, M = [int(k) for k in input().split()]
nodes = {k:[] for k in range(1,N+1)}
visited = [False for i in range(N+1)]

for i in range(M):
  a, b = [int(k) for k in input().split()]
  nodes[a].append(b)
  nodes[b].append(a)
  
def dfs(i):
  visited[i] = True
  cnt = 1
  for j in nodes[i]:
    if not visited[j]:
      cnt += dfs(j)
      
  return cnt
   
ans = 0
for z in nodes:
  if not visited[z]:
    ans = max(dfs(z),ans)

print(ans)

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]    
      
def program():
  N, M = map(int, input().split())
  uf = UnionFind(N)
  for i in range(M):
    a, b = map(int, input().split())
    uf.union(a-1,b-1)
  
  ans = max([uf.size(i) for i in range(N)])
  return ans

print(program())
input_unko = input('number')
input_tinko = input('number')
if input_unko * input_tinko % 2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

a,b = map(int, input().split())
if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')
N,M = map(int,input().split())
AB = [list(map(int,input().split())) for i in range(M)]

ans = [-1] * (N+1)
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)

for i in range(N+1):
    graph[i].sort()
    
from collections import deque
todo = deque([(1,0)])
while todo:
    x,parent = todo.pop()
    ans[x] = parent
    for y in graph[x]:
        if y == parent:
            continue
        if ans[y] == -1:
            todo.append((y,x))
print('Yes')
for i in range(2,N+2):
    print(ans[i])

### FIXED CODE ###

N,M = map(int,input().split())
AB = [list(map(int,input().split())) for i in range(M)]
 
ans = [-1] * (N+1)
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
    

from collections import deque
import sys
ans = [-1] * (N+1)
todo = deque([(1,0)])
while todo:
    x,parent = todo.popleft()
    # ans[x] = parent
    for y in graph[x]:
        if y == parent:
            continue
        if ans[y] != -1:
            continue
        ans[y] = x
        todo.append((y,x))
        

if -1 in ans[2:]:
    print('No')
else:
    print('Yes')
    for i in range(2,N+1):
        print(ans[i])
S = input()
K = int(input())

i = 0
counter = 0
while counter < K:
	counter += int(S[i])**5e15
	i += 1
print(S[i])

### FIXED CODE ###

S = input()
K = int(input())

a = 1
for i in range(K):
	if int(S[i]) != 1:
		print(int(S[i]))
		a = 0
		break
if a == 1:
	print(a)
N,K,Q= map(int,input().split())
score = [K-Q]*N
A = [0]*Q
for i in range(Q):
    A[i] = int(input())

for a in A:
    score[a] += 1

print(*map(lambda x:['No','Yes'][x>0],score),sep='\n')

### FIXED CODE ###

N,K,Q = map(int,input().split())
score = [K-Q]*N
A = [0]*Q
for i in range(Q):
    A[i] = int(input())

for a in A:
    score[a-1] += 1

for i in map(lambda x:['No','Yes'][x>0],score):
    print(i)
S = input()
c = 0
m = 0
if s in S:
  if s == "R":
    c+=1
    m = max(c, m)
  else:
    m = max(c, m)
    c = 0
print(m)
    
    

### FIXED CODE ###

S = input()
c = 0
m = 0
for s in S:
    m = max(c, m)
    if s == "R":
        c += 1
        m = max(c, m)
    else:
        c = 0
print(m)
n = int(input())
a = list(map(int, input().split()))

count = 0
flag = True

while flag:
	for i in range(n):
      if a[i] % 2 != 0:
        flag = False
      
      if flag == False:
        break
        
      for i in range(n):
        a[i] /= 2
    count = count+1
print(count)


### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))

count = 0
flag = True

while flag:
    for i in range(n):
        if a[i] % 2 != 0:
            flag = False

    if flag == False:
        break

    for i in range(n):
        a[i] //= 2
    count = count + 1
print(count)
def abcCalc(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(abcCalc(abcList[1], dp[0]))

for i in range(2, N):
    dp.append(abcCalc(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]))
n,d=map(int,input().split())
a=(2*d)+1
if n%a==0:
  print(int(n/a))
else:
  print((n//a)+1)


### FIXED CODE ###

n=int(input())
p=list(map(int,input().split()))
cnt=0
for i in range(0,n):
  if p[i]==i+1:
    cnt+=0
  else:
    cnt+=1
    
if cnt<=2:
  print("YES")
else:
  print("NO")
N, M, K = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

max_num = 0


def dfs(curr_a, curr_b, choice, time_required, count):
    global max_num
    if choice == 0:
        if curr_a >= N - 1:
            if max_num < count:
                max_num = count
            return
        else:
            curr_a += 1
            time_required += a[curr_a]
    else:
        if curr_b >= M - 1:
            if max_num < count:
                max_num = count
            return
        else:
            curr_b += 1
            time_required += b[curr_b]
    if time_required > K:
        return
    count += 1
    if max_num < count:
        max_num = count
    dfs(curr_a, curr_b, 0, time_required, count)
    dfs(curr_a, curr_b, 1, time_required, count)

curr_a = -1
curr_b = -1
time_required = 0
count = 0
dfs(curr_a, curr_b, 0, time_required, count)
curr_a = -1
curr_b = -1
time_required = 0
count = 0
dfs(curr_a, curr_b, 1, time_required, count)

print(max_num)

### FIXED CODE ###

N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
a, b = [0], [0]
for i in range(N):
    a.append(a[i] + A[i])
for i in range(M):
    b.append(b[i] + B[i])

ans, j = 0, M
for i in range(N + 1):
    if a[i] > K:
        break
    while b[j] > K - a[i]:
        j -= 1
    ans = max(ans, i + j)
print(ans)
a = list(map(int,input()split())
a.sort()
print(a[0] + a[1])


### FIXED CODE ###

a = list(map(int,input().split()))
a.sort()
print(a[0] + a[1])
N = int(input())
restourants = dict()

for i in range(N):
    S, P = map(str,input().split())
    if S not in restourants:
        restourants[S] = {}
    restourants[S][int(P)] = i+1
for k, v in sorted(restourants.items()):
    if len(v)>1:
        v = sorted(v.items(),reverse=True)
    
    for i in v:
        print(i[1])

### FIXED CODE ###

N = int(input())
restourants = dict()

for i in range(N):
    S, P = map(str,input().split())
    if S not in restourants:
        restourants[S] = {}
    restourants[S][int(P)] = i+1
for k, v in sorted(restourants.items()):
    v = sorted(v.items(),reverse=True)
    for i in v:
        print(i[1])
A,B = [int(i) for i in input().split()]
if A>B:
  print('GREATER')
elif A<B:
  print('LESS')
else:
  print('EQUAL')

### FIXED CODE ###

A = int(input())
B = int(input())
if A>B:
  print('GREATER')
elif A<B:
  print('LESS')
else:
  print('EQUAL')
n=int(input())
out=0
for i in range(n):
  a,m=map(int,input().split())
  out+=m-a+1
print(out)
n=int(input())
out=0
for i in (n):
  a,m=map(int,input().split())
  out+=m-a+1
print(out)


### FIXED CODE ###

n=int(input())
out=0
for i in range(n):
  a,m=map(int,input().split())
  out+=m-a+1
print(out)
import sys


def g(inta, intb):
    d = abs(a - b)
    return g(d, a) if a % d != 0 else d


def lcm(inta, intb, intgcd):
    return (inta * intb // intgcd)


sets = sys.stdin.readlines()
for line in sets:
    a, b = map(int, line.split())
    c = g(a, b)
    print(c, lcm(a,b,c))

### FIXED CODE ###

import sys
 
def gcd(inta, intb):
    large = max(inta, intb)
    small = min(inta,intb)
    mod = large % small
    if mod ==0:
        return small
    else:
        return gcd(small, mod) 
     
def lcm(inta, intb, intgcd):
    return (inta * intb // intgcd)
 
sets = sys.stdin.readlines()
for line in sets:
    a, b = map(int, line.split())
    c = gcd(a, b)
    print(c, lcm(a, b, c))
w=input()
h=input()
w=int(w)
h=int(h)
print(w*h,2*w+2*h)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b,(a+b)*2)
def P(s):
 R,P,*L=[0]*28
 for i in range(1,366):t=I[i+364][0]-1;P+=s-(i-L[t])*C[t];R+=I[i-1][t]-P;L[t]=i
 return R
_,C,*I=[[*map(int,t.split())]for t in open(0)]
for d,q in I[701:]:I[d+364][0]=q;print(P(sum(C)))

### FIXED CODE ###

def P(s):
  L = [0] * 26
  R = P = 0
  for i in range(D):
    t = I[i + D][0] - 1
    R += I[i][t]
    P += s - (i + 1 - L[t]) * C[t]
    R -= P
    L[t] = i + 1
  return R
(D,), C, *I = [list(map(int, o.split())) for o in open(0)]
for d, q in I[2*D + 1:]:
  I[d - 1 + D][0] = q
  print(P(sum(C)))
# Aizu Problem 0221: Fizz Buzz

import sys, math, os, struct

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def valid(k, a):
    if k % 3 == 0 and k % 5 == 0:
        return a == "FizzBuzz"
    elif k % 3 == 0:
        return a == "Fizz"
    elif k % 5 == 0:
        return a == "Buzz"
    else:
        return int(a) == k

    
def fizz_buzz(m, n, A):
    players = list(range(1, m + 1))
    p = 0
    k = 0
    while len(A) > 0:
        k += 1
        a = A.pop(0)
        if valid(k, a):
            p = (p + 1) % m
        else:
            if len(players) == 0:
                print()
                return
            players.pop(p)
            if len(players) == 1:
                break
            m -= 1
            if p == m:
                p = 0
    print(' '.join([str(p) for p in players]))
    
    
while True:
    m, n = [int(_) for _ in input().split()]
    if m == 0:
        break
    A = [input().strip() for _ in range(n)]
    fizz_buzz(m, n, A)

### FIXED CODE ###

# Aizu Problem 0221: Fizz Buzz

import sys, math, os, struct

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


def valid(k, a):
    if k % 15 == 0: 
        return a == "FizzBuzz"
    elif k % 3 == 0:
        return a == "Fizz"
    elif k % 5 == 0:
        return a == "Buzz"
    else:
        return a == str(k)

    
def fizz_buzz(m, n, A):
    players = list(range(1, m + 1))
    p = 0
    k = 0
    while len(A) > 0:
        k += 1
        a = A.pop(0)
        if valid(k, a):
            p = (p + 1) % m
        else:
            if len(players) == 0:
                print()
                return
            players.pop(p)
            if len(players) == 1:
                break
            m -= 1
            p %= m
    print(' '.join([str(p) for p in players]))
    
    
while True:
    m, n = [int(_) for _ in input().split()]
    if m == 0:
        break
    A = [input().strip() for _ in range(n)]
    fizz_buzz(m, n, A)
a,b = map(int,input())

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

### FIXED CODE ###

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

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

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')


### FIXED CODE ###

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


if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')