Harryxun/stf_run huggingface dataset:
while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f ==r -1:
        break

    if m + f  <= 80:
        print('A')

    elif m + f == 60 < 80:
        print('B')

    elif m + f == 50 < 65:
        print('C')

    if m + f == 30 < 50:
        print('D')

    elif r <= 50:
        print('C')

    else:
        print('F')

### FIXED CODE ###

while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f
    if m == -1 or f == -1 or total < 30:
        print('F')

    elif total < 50 and r < 50:
        print('D')

    elif total < 65:
        print('C')
        
    elif total < 80:
        print('B')

    else:
        print('A')
N=int(input())
A=int(input())
flag=True
ans="No"

for i in range(0,A+1):
  flag:
    for j in range(0,N//500+1)):
      if i+500*j==N:
        ans="Yes"
        flag=False
        break

print(ans)

### FIXED CODE ###

N=int(input())
A=int(input())
flag=True
ans="No"

for i in range(0,A+1):
  if flag:
    for j in range(0,N//500+1):
      if i+500*j==N:
        ans="Yes"
        flag=False
        break

print(ans)
import datetime

def is_leap_year(y):
    return y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)

def leap_year_count(target_y,benchmark_y):
    target = target_y // 4 - target_y // 100 + target_y // 400
    benchmark = benchmark_y // 4 - benchmark_y // 100 + benchmark_y // 400
    return target - benchmark

def ad2mayan(y, m, d):
    diff = 0
    if datetime.MAXYEAR < y:
        day_of_2012 = (datetime.date(2013, 1, 1) - datetime.date(2012, 12, 21)).days
        day_of_the_year = (datetime.date(1, m, d) - datetime.date(1, 1, 1)).days if is_leap_year(y) else (datetime.date(4, m, d) - datetime.date(4, 1, 1)).days
        
        days = (y - 2013) * 365 + leap_year_count(y, 2013)

        diff = day_of_2012 + days + day_of_the_year
    else:
        benchmark = datetime.date(2012, 12, 21)
        diff = (datetime.date(y, m, d) - benchmark).days
    
    ki, diff = diff % 20, diff // 20
    w, diff = diff % 18, diff // 18
    t, diff = diff % 20, diff // 20
    ka, diff = diff % 20, diff // 20
    b = diff % 13
    
    return b,ka,t,w,ki

def mayan2ad(b, ka, t, w, ki):
    ka += b * 20
    t += ka * 20
    w += t * 18
    ki += w * 20
    time = datetime.date(2012, 12, 21) + datetime.timedelta(ki)
    return time.year, time.month, time.day


import sys
f = sys.stdin

for line in f:
    if line == '#':
        continue
    t = list(map(int, line.split('.')))
    if len(t) == 3:
        print('.'.join(map(str, ad2mayan(*t))))
    else:
        print('.'.join(map(str, mayan2ad(*t))))

### FIXED CODE ###

import datetime
from datetime import timedelta
from datetime import date

def ad2mayan(y, m, d):
    days = 0
    while datetime.MAXYEAR < y:
        days += 365 * 400 + 97
        y -= 400

    days += (date(y, m, d) - date(2012, 12, 21)).days
    
    ki, days = days % 20, days // 20
    w, days = days % 18, days // 18
    t, days = days % 20, days // 20
    ka, days = days % 20, days // 20
    b = days % 13
    
    return b,ka,t,w,ki

def mayan2ad(b, ka, t, w, ki):
    ka += b * 20
    t += ka * 20
    w += t * 18
    ki += w * 20
    dt = datetime.date(2012, 12, 21) + timedelta(ki)
    return dt.year, dt.month, dt.day

import sys
f = sys.stdin


for line in f:
    if line[0] == '#':
        break
    t = list(map(int, line.split('.')))
    
    if len(t) == 3:
        print('.'.join(map(str, ad2mayan(*t))))
    elif len(t) == 5:
        print('.'.join(map(str, mayan2ad(*t))))
a,b = int(input().split())
if a<= 13:
  sum = b
elif 6<= a <= 12:
  sum = b/2
elif 5>=a:
  sum = 0
print(sum)
 

### FIXED CODE ###

a,b = (int(i) for i in input().split())  
sum = b
if 13<= a:
  sum = b
if 6<= a <= 12:
  sum = b/2
if 5>=a:
  sum = 0
print(int(sum))
N,K=int(int(x) for x in input().split())
lists=[0]*N
while 1:
    tmp=int(input())
    if not tmp:
        break
    have_count=int(input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.count(0))



### FIXED CODE ###

N,K=(int(x) for x in input().split())
lists=[0]*N
while 1:
    try:
        tmp=int(input())
    except :
        break
    have_count=(int(x) for x in input().split())
    for i in have_count:
        lists[i-1]=1
print(lists.count(0))
x = int(input())
answer = 0
while x >= 10:
    answer += x%10
    x = int(x/10)
answer += x
if answer % 9 == 0:
    print('Yes')
elif answer == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = int(input())
nst = str(n)
keta= len(nst)
answer = 0
for i in range(keta):
    answer += int(nst[i])
if answer % 9 == 0:
    print('Yes')
else:
    print('No')
d,t,s=map(int,input().split())
x=d/s
if x<=t:
  print("Yes")
else:
  print("No)

### FIXED CODE ###

d,t,s=map(int,input().split())
x=d/s
if x<=t:
  print("Yes")
else:
  print("No")
#D
n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
nxt = 1
loop = []
tset = set()
final = -1
while 1:
    loop.append(nxt)
    tset.add(nxt)
    nxt = a[nxt-1]
    if nxt in tset:
        final = nxt #重複した町
        break
m = -1
for i in range(n):
    if loop[i]==final:
        m = i
        break
l = len(a)
if k < m:
    print(loop[m])
else:
    print(loop[(k+1-m)%(l-m)])
# print(loop[(k+1)%l])

### FIXED CODE ###

#D
n,k = list(map(int,input().split()))
a = list(map(int,input().split()))
nxt = 1
loop = []
tset = set()
final = -1
while 1:
    loop.append(nxt)
    tset.add(nxt)
    nxt = a[nxt-1]
    if nxt in tset:
        final = nxt #重複した町
        break
m = -1
for i in range(len(loop)):
    if loop[i]==final:
        m = i
        break
l = len(loop)
if k < m:
    print(loop[k])
else:
    print(loop[(k-m)%(l-m)+m])
# print(loop[(k+1)%l])
N, Q = map(int, input().split())
S = input()
lr = []
for i in range(Q)
    l,r = map(int, input().split())
    print(S[l-1:r].count('AC'))

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
c = [0]*N
for i in range(1, N):
    c[i] = c[i-1]
    if S[i-1]=="A" and S[i]=="C":
        c[i] = c[i-1] + 1
for _ in range(Q):
    l, r = map(int, input().split())
    print(c[r-1]-c[l-1])
n,m=map(int, input().split())
s=list(input())
count=0
x=0
y=0
s=['R']+s+['L']

for i in range(1,n+1):
    if s[i]=='L':
        if s[i-1]==s[i]:
            count+=1
    else:
        if s[i]==s[i+1]:
            count+=1
       
for i in range(1,n+1):
    if s[1]=='L':
        if s[i-1]=='R' and s[i]=='L':
            if i==1:
                x+=1
            else:
                y+=1

    else:
        if s[i]=='R' and s[i+1]=='L':
            if i==n:
                x+=1
            else:
                y+=1
if m<y:
    print(count+2*m)
elif m==y:
    print(count+y*2-1)
else:
    print(count+y*2-1+x)
    


        
        
    
    
        



### FIXED CODE ###

n=int(input())
print(n**3)
import bisect
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def tami(index):
  if index == N:
    ans.append(-1)
    return
  num = a[index]
  if len(data[num]) == 1:
    ans.append(index)
    tami(index+1)
  elif index == data[num][-1]:
    ans.append(index)
    tami(data[num][0] +1)
  else:
    tmp = bisect.bisect_right(data[num],index)
    #print(num,data[num],tmp)
    tami(data[num][tmp]+1)

def judge(x):
  d = []
  d.append(a[x])
  while True:
    x += 1
    if x == N:
      break
    if len(data[a[x]]) == 1:
      d.append(a[x])
    elif x == data[a[x]][-1]:
      d.append(a[x])
    else:
      tmp = bisect.bisect_right(data[a[x]],x)
      x = data[a[x]][tmp]
  return d

N,K = IL()
a = IL()

data = [[] for i in range(N+1)]
ans = []

for i in range(N):
  data[a[i]].append(i)

#print(data)

tami(0)
#print(ans)
#print(len(ans),K)
#print(K%len(ans))

if ans == [-1] or K%len(ans) == 0:
  print()
else:
  print(" ".join(map(str,(judge(ans[K%len(ans)-1])))))
"""
for i in range(K):
  for j in range(N):
    if a[j] in data:
      num = data.index(a[j])
      data = data[:num]
    else:
      data.append(a[j])
  print(data)

11 10
1 2 3 0 4 5 6 0 4 5 6

11 10
3 1 4 1 5 9 2 6 5 3 5

10 10
1 4 8 3 5 4 2 3 4 6
"""

### FIXED CODE ###

import bisect
import sys
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

def tami(index):
  if index == N:
    ans.append(-1)
    return
  num = a[index]
  if len(data[num]) == 1:
    ans.append(index)
    tami(index+1)
  elif index == data[num][-1]:
    ans.append(index)
    tami(data[num][0]+1)
  else:
    tmp = bisect.bisect_left(data[num],index)
    #print(num,data[num],tmp)
    tami(data[num][tmp+1]+1)

N,K = IL()
a = IL()

data = [[] for i in range(200010)]
ans = []

for i in range(N):
  data[a[i]].append(i)

#print(data)

tami(0)

#print(ans)
#print(len(ans),K)
#print(K%len(ans))

if K%len(ans) == 0:
  print()
else:
  x = ans[K%len(ans)-1]
  d = []
  d.append(a[x])
  while x != N-1:
    x += 1
    if len(data[a[x]]) == 1:
      d.append(a[x])
    elif x == data[a[x]][-1]:
      d.append(a[x])
    else:
      tmp = bisect.bisect_left(data[a[x]],x)
      x = data[a[x]][tmp+1]

  print(" ".join(map(str,d)))

"""
for i in range(K):
  for j in range(N):
    if a[j] in data:
      num = data.index(a[j])
      data = data[:num]
    else:
      data.append(a[j])
  print(data)

11 10
1 2 3 0 4 5 6 0 4 5 6

11 10
3 1 4 1 5 9 2 6 5 3 5

10 10
1 4 8 3 5 4 2 3 4 6
"""
x,y=map(int,input().split())
a=[300000,200000,100000]
add=0
if x*y==1:
    add=400000
print(a[x-1]+a[y-1]+add)


### FIXED CODE ###

x,y=map(int,input().split())
a=[300000,200000,100000]
b=[0]*300
a=a+b
add=0
if x*y==1:
    add=400000
print(a[x-1]+a[y-1]+add)
import sys
h, w = map(int, sys.stdin.readline().split())
dp = [[0] * w for _ in range(h)]
G = [list(map(int, i.split())) for i in sys.stdin.readlines()]
for x in range(h):
    dp[x][0] = 1 if G[x][0] == 0 else 0
for y in range(w):
    dp[0][y] = 1 if G[0][y] == 0 else 0
for i in range(1, h):
    for j in range(1, w):
        if(G[i][j] == 0):
            dp[i][j] = min(dp[i - 1][j - 1], dp[i - 1][j], dp[i][j - 1]) + 1
print(max(sum(dp, []) ** 2))

### FIXED CODE ###

import sys
import itertools
h, w = map(int, sys.stdin.readline().split())
dp = [[0] * w for _ in range(h)]
G = [[int(j) for j in sys.stdin.readline().split()] for _ in range(h)]
for x in range(h):
    dp[x][0] = 1 if G[x][0] == 0 else 0
for y in range(w):
    dp[0][y] = 1 if G[0][y] == 0 else 0
for i in range(1, h):
    for j in range(1, w):
        if(G[i][j] == 0):
            dp[i][j] = min(dp[i - 1][j - 1], dp[i - 1][j], dp[i][j - 1]) + 1
print(max(max(i) for i in dp) ** 2)
N, M = map(int, input().split())
ans = -1
li = []

for i in range(M):
  s, c = map(int, input().split())
  if not [s, c] == [1, 0]:
    li.append([s, c])
  
if N==1 and li!=[]:
  ans = 0
  
for i in range(10**(N-1), 10**N):
  j = 0
  while j < M:
    num = str(i)
    l = li[j]
    if num[l[0]-1] != str(l[1]):
      break;
    j += 1
  else:
    ans = i
    break;
    
print(ans)


### FIXED CODE ###

def check(x):
  if len(str(x))!=N:
    return False
  for i in range(M):
    if str(x)[S[i]]!=str(C[i]):
      return False
  return True

N,M=map(int,input().split())
S=[]
C=[]
for i in range(M):
  s,c=map(int,input().split())
  s-=1
  S.append(s)
  C.append(c)
#print(S,C)
for i in range(1000):
  if check(i):
    print(i)
    exit()   
print(-1)
c = str(input())
if "a", "e", "i", "o", "u" in c:
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

c = str(input())
if c in "aiueo":
  print("vowel")
else:
  print("consonant")
N,K=map(int,input().split())
X=list(map(int,input().split()))
hidari=0
migi=N-1
if N-K!=0:
    for i in range(N-K):
      if abs(X[hidari])>=abs(X[migi]):
        hidari=hidari+1
      else:
        migi=migi-1

if X[hidari]<0 and X[migi]>0:
  if abs(X[hidari])>=abs(X[migi]):
    print(2*abs(X[migi])+abs(X[hidari]))
  else:
    print(2*abs(X[hidari])+abs(X[migi]))
else:
  if abs(X[hidari])>=abs(X[migi]):
    print(abs(X[hidari]))
  else:
    print(abs(X[migi]))

### FIXED CODE ###

n,i=map(int,input().split(" "))
print(n-i+1)
def make7(i, f, sum):
    if i == 3:
        if sum == 7:
            print(f + "=7")
            exit()
    else:
        make7(i+1, f+"+"+S[i+1], sum+S[i+1])
        make7(i+1, f+"-"+S[i+1], sum-S[i+1])


S = input()
n = len(S)

make7(0, S[0], S[0])


### FIXED CODE ###

def make7(i, f, sum):
    if i == 3:
        if sum == 7:
            print(f + "=7")
            exit()
    else:
        make7(i+1, f+"+"+S[i+1], sum+int(S[i+1]))
        make7(i+1, f+"-"+S[i+1], sum-int(S[i+1]))


S = input()
n = len(S)

make7(0, S[0], int(S[0]))
a,b,c,k=map(int,input().split())
count=0
s=a+b
t=a+b+c
if k<=a:
    for i in k:
        count+=1
elif a<k and k<=s:
    count=1*a
elif k<t:
    p=(-1)*c
    count=1*a+p
print(count)


### FIXED CODE ###

a,b,c,k=map(int,input().split())
count=0
if k<=a:
    count=1*k
elif a<k and k<=(a+b):
    count=1*a
elif (a+b)<k and k<=(a+b+c):
    count=1*a+(-1)*(k-a-b)
print(count)
# C - Stones

N = int(input())
S = input()

#print(list(S))
cnt = 0


# stones[i] == "#" のときに stones[i+1] == "." なら stones[i+1] = "#"にしてcnt ++する
def BlackToWhite(stones, len, i):
    global cnt
    if stones[0:i + 1]:
        if stones[i] == "#" and stones[i + 1] == ".":
            cnt += 1
            stones[i + 1] = "#"

        i += 1
        if i >= len - 1:
            print(cnt)
            exit()
        else:
            BlackToWhite(stones, len, i)
    else:
        print(cnt)
        exit()


BlackToWhite(list(S), N, 0)



### FIXED CODE ###

N = int(input())
S = input()
ac = [0]

# 黒の累積和テーブルを作る
for i in range(N):
    if S[i] == "#":
        ac.append(ac[i] + 1)
    else:
        ac.append(ac[i])

#print(ac)

work_min = N
for j in range(0, N + 1):
    work_sum = ac[j] + (N - j - (ac[N] - ac[j]))
    if work_min > work_sum:
        work_min = work_sum

print(work_min)
h,w=map(int,input().split())

m=[input() for i in range(w)]

cnt=[[1000000 for i in range(h)] for j in range(w)]



print(0)


### FIXED CODE ###

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

m=[input() for i in range(h)]


cnt=[[1000000 for i in range(w)] for j in range(h)]

if m[0][0]=="#":
    cnt[0][0]=1
else:
    cnt[0][0]=0

for y in range(h):
    for x in range(w):
        if x>0:
            if m[y][x-1]=="." and m[y][x]=="#":
                cnt[y][x]=min(cnt[y][x],cnt[y][x-1]+1)
            else:
                cnt[y][x]=min(cnt[y][x],cnt[y][x-1])
        if y>0:
            if m[y-1][x]=="." and m[y][x]=="#":
                cnt[y][x]=min(cnt[y][x],cnt[y-1][x]+1)
            else:
                cnt[y][x]=min(cnt[y][x],cnt[y-1][x])


print(cnt[h-1][w-1])
n, a, b = map(int, input().split())
mod = 10 ** 9 + 7


def choose(n, r, mod):
    r = min(r, n - r)
    x = 1
    y = 1
    for i in range(r):
        x = x * (n - i) % mod
        y = y * (i + 1) % mod
    y = pow(y, -2, mod)
    return x * y % mod


ans = pow(2, n, mod) - 1 - choose(n, a, mod) - choose(n, b, mod)

while ans < 0:
    ans += mod
print(ans)


### FIXED CODE ###

n, a, b = map(int, input().split())
mod = 10 ** 9 + 7


def choose(n, r, mod):
    r = min(r, n - r)
    x = 1
    y = 1
    for i in range(r):
        x = x * (n - i) % mod
        y = y * (i + 1) % mod
    y = pow(y, mod-2, mod)
    return x * y % mod


ans = pow(2, n, mod) - 1 - choose(n, a, mod) - choose(n, b, mod)

while ans < 0:
    ans += mod
print(ans)
S = input()
T = input()

for i in range(len(S)):
    s=S[-i:]+S[0:-i]
    if s==T:
        print('Yes')
        break
else:
    print('No')

### FIXED CODE ###

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

A.sort()
A.reverse()

print(abs(A[0]-A[1])+abs(A[1]-A[2]))
X, N = map(int, input().split())
p = list(map(int, input().split()))

for d in range(X + 1):
    if (X - d) not in p:
        print(X-d)
        exit()
    elif (X + d) not in p:
        print(X+d)
        exit()

### FIXED CODE ###

import numpy as np
x = list(map(int, input().split()))

sub=[]
for i in range(len(x)):
    if x[i]== 0:
        sub.append(i+1)
print(*sub)
W, H, x, y, r = map(int, input().split())
if x + r =< W and x - r => 0 and y + r =< H and y - r => 0:
	print('Yes')
else:
	print('No')

### FIXED CODE ###

W, H, x, y, r = map(int, input().split())
if (0 <= x-r and x+r <= W) and (0 <= y-r and y+r <= H):
	print('Yes')
else:
	print('No')
N = int(input())
a = [(int(v),i) for i, v in enumerate(input().split())]
ao = sum([v for v, i in a if i%2 and v>0])
ae = sum([v for v, i in a if not i%2 and v>0])
if max(ao, ae)== 0:
     ai = [a.index(max(a))]
     Ans = [1]*(ai)+list(range(N-ai,1,-1))
     for i in Ans:
         print(i)
if ao >= ae:
    print(ao)
    yn = [i for v, i in a if i%2 and v>0]
else:
    print(ae)
    yn = [i for v, i in a if not i%2 and v>0]
listyn = [i in yn for i in range(N)]
Ans = []
while not listyn[0]:
    Ans.append(1)
    listyn = listyn[1:]
while not listyn[-1]:
    Ans.append(len(listyn))
    listyn = listyn[:-1]
while True:
    if len(listyn) == 1:
        break
    if len(listyn) in [2,3]:
        Ans.append(2)
        break
    if listyn[2]:
        Ans.append(2)
        listyn = [True] + listyn[3:]
    else:
        Ans.append(3)
        listyn = [True] + listyn[4:]
print(len(Ans))
for i in Ans:
    print(i)

### FIXED CODE ###

import sys
N = int(input())
a = [(int(v),i) for i, v in enumerate(input().split())]
ao = sum([v for v, i in a if i%2 and v>0])
ae = sum([v for v, i in a if not i%2 and v>0])
if max(ao, ae)== 0:
    ai = a.index(max(a))
    Ans = [1]*(ai)+list(range(N-ai,1,-1))
    print(max(a)[0])
    print(len(Ans))
    for i in Ans:
        print(i)
    sys.exit()
if ao >= ae:
    print(ao)
    yn = [i for v, i in a if i%2 and v>0]
else:
    print(ae)
    yn = [i for v, i in a if not i%2 and v>0]
listyn = [i in yn for i in range(N)]
Ans = []
while not listyn[0]:
    Ans.append(1)
    listyn = listyn[1:]
while not listyn[-1]:
    Ans.append(len(listyn))
    listyn = listyn[:-1]
while True:
    if len(listyn) == 1:
        break
    if len(listyn) == [2,3]:
        Ans.append(2)
        break
    if listyn[2]:
        Ans.append(2)
        listyn = [True] + listyn[3:]
    else:
        Ans.append(3)
        listyn = [True, False] + listyn[4:]
print(len(Ans))
for i in Ans:
    print(i)
n,m = map(int,input().split())
para = [int(input()) for i in range(m)]
mod = 10**9+7
 
import sys
sys.setrecursionlimit(100000)
 
dp = [1,0]
def dps(cnt,cantvisit):
    if cnt == n + 1 :
        return 
 
    else :
        if cnt == 1 :
            if cnt in cantvisit :
                dp[1] = 0
                cnt += 1
            else : 
                dp[1] = 1
                cnt += 1
        else :
            if cnt in cantvisit : 
                a  = 0 
                dp[0] = dp[1]
                dp[1] = a
                cnt += 1
            else :
                
                a  = (dp[0] + dp[1]) % mod
                dp[0] = dp[1]
                dp[1] = a 
                cnt += 1
        return dps(cnt,cantvisit)
dps(1,para)
print("{}".format(dp[1]))

### FIXED CODE ###

n,m = map(int,input().split())
para = [int(input()) for i in range(m)]
mod = 10**9+7
dp = [-1]*(n+1)
for i in para:
    dp[i] = 0
for i in range(n+1):
    if  dp[i] != 0 :
        if i == 1 or i==0:
            dp[i] = 1
        else:
            dp[i] = (dp[i-1] + dp[i-2])%mod



print("{}".format(dp[-1]))
n=int(input())
lst=[input() for i in range(n)]
xs=list(set(lst))
ans=[]
for i in xs:
  cnt=lst.count(i)
  ans,append([i,cnt])
ans.sort(key=lambda x:x[1])
pin=ans[-1][1]
ans2=[]
for i in ans:
  if i[1]==pin:
    ans2.append(i[0])
ans2.sort()
for i in ans2:
  print(i)

### FIXED CODE ###

n=int(input())
dict={}
xs=[]
for i in range(n):
  s=input()
  xs+=[s]
  if s not in dict:
    dict[s]=1
  else:
    dict[s]+=1
pin=0
xs=list(set(xs))
for i in xs:
  pin=max(pin,dict[i])
ans=[]
for i in xs:
  if dict[i]==pin:
    ans+=[i]
ans.sort()
for i in ans:
  print(i)
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])

if (a >= 1) or (b <= 100):
    num = a * b
    length = (a * 2) + (b * 2)
    print(num + " " + length, end="\n")
else:
    pass

### FIXED CODE ###

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

if (a >= 1) or (b <= 100):
    num = str(a * b)
    length = str((a * 2) + (b * 2))
    print(num + " " + length, end="\n")
else:
    pass
A,B = map(int, input().split())
import math
print((A*B) // math.gcd(A,B))

### FIXED CODE ###

A,B = map(int, input().split())
import fractions
print((A*B) // fractions.gcd(A,B))
n = int(input())

ans = [0]*10000
a = [1]*3

while (a[0]+1)**2 <= n-2:
    a[1]=1
    while (a[1]+a[0])*(a[1]+1)+a[0]**2<=n-1:
        a[2]=1
        while a[0]**2+a[1]**2+a[2]**2+a[0]*a[1]+a[1]*a[2]+a[2]*a[0] <= n:
            ans[a[0]**2+a[1]**2+a[2]**2+a[0]*a[1]+a[1]*a[2]+a[2]*a[0]] += 1
            a[2] += 1
        a[1]+=1
    a[0]+=1
for i in range(n):
    print(ans[i])




### FIXED CODE ###

n = int(input())

ans = [0]*10001
a = [1,1,1]

while (a[0]+1)**2 <= n-2:
    a[1]=1
    while (a[1]+a[0])*(a[1]+1)+a[0]**2<=n-1:
        a[2]=1
        while a[0]**2+a[1]**2+a[2]**2+a[0]*a[1]+a[1]*a[2]+a[2]*a[0] <= n:
            ans[a[0]**2+a[1]**2+a[2]**2+a[0]*a[1]+a[1]*a[2]+a[2]*a[0]] += 1
            a[2] += 1
        a[1]+=1
    a[0]+=1
for i in range(1,n+1):
    print(ans[i])
N=int(input())
if N<10:
  print(N)
elif 10=<N<100:
  print(9)
elif 100=<N<1000:
  print(N-90)
elif 1000=<N<10000:
  print(909)
elif 10000=<N<100000:
  print(N-9090)
else:
  print(90909)

### FIXED CODE ###

N=int(input())
if N<10:
  print(N)
elif 10<=N<100:
  print(9)
elif 100<=N<1000:
  print(N-90)
elif 1000<=N<10000:
  print(909)
elif 10000<=N<100000:
  print(N-9090)
else:
  print(90909)
N,M=map(int, input().split())
A=list(map(int, input().split()))
inf = float('inf')

number = [6,2,5,5,4,5,6,3,7,6]


dp = [-1*inf]*(N+1)
dp[0] = 0
for i in range(1,N+1):
  dp_new = 0
  for j in A:
    if i - number[j] >= 0:
      if dp[i-number[j]] +1 > dp_new:
        dp[i] = dp[i-number[j]] +1

A.sort(reverse=True)
ans = ""
while N > 0:
  for j in A:
    if dp[N] == dp[N-number[j]] + 1:
      ans += str(j)
      N -= number[j]
      break

print(int(ans))

### FIXED CODE ###

N,M=map(int, input().split())
A=list(map(int, input().split()))
inf = float('inf')

number = [6,2,5,5,4,5,6,3,7,6]


dp = [-1*inf]*(N+1)
dp[0] = 0
for i in range(1,N+1):
  dp_new = 0
  for j in A:
    if i - number[j] >= 0:
      if dp[i-number[j]] +1 > dp_new:
        dp[i] = dp[i-number[j]] +1
        dp_new = dp[i]

A.sort(reverse=True)
ans = ""
while N > 0:
  for j in A:
    if N - number[j] >= 0:
      if dp[N] == dp[N-number[j]] + 1:
        ans += str(j)
        N -= number[j]
        break

print(int(ans))
a,b,x = map(int, input().split())
if a!=0:
  c = int((a-1)/x)
  d = int(b/x)
if a!=0:
  print(d-c)
elif a==0:
  print(d)


### FIXED CODE ###

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

ans = int(b // x) - int((a - 1) // x)

print(ans)
d,t,s=map(int,input().split())
if d<=t*s:
  print(Yes)
else:print(No)

### FIXED CODE ###

d,t,s=map(int,input().split())
if d<=t*s:
  print('Yes')
else:print('No')
n,k = map(int,input().split())
p = list(map(imt,input().split()))
p.sort()
print(sum(p[:k]))

### FIXED CODE ###

n, k = map(int,input().split())
p = list(map(int, input().split()))
p.sort()
print(sum(p[:k]))
import functools

n = int(input())
xs = input().split()

def foldSum(acc, x):
    return acc*int(x)

if 0 in res:
    print(0)
else:
    res = functools.reduce(foldSum, xs, 1)

    if res > 1e18:
        print(-1)
    else:
        print(res)



### FIXED CODE ###

import functools

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

def foldMulti(acc, x):
    return acc*x

if 0 in xs:
    print(0)
elif len([x for x in xs if x > 1]) >= 60:
    print(-1)
else:
    res = functools.reduce(foldMulti, xs, 1)

    if res > 1e18:
        print(-1)
    else:
        print(res)
N=int(input())
A=[int(i) for i in input()]
maxv=A[0]
minv=A[1]-A[0]
for i in range(N):
  maxv=max(maxv,A[i]-minv)
  minv=min(minv,A[i])
print(maxv)

### FIXED CODE ###

N=int(input())
A=[int(i) for i in input().split()]
A.sort()
print(A[-1]-A[0])