Harryxun/stf_run huggingface dataset:
A, B = map(int, raw_input().split())

print(str(w*h) + ' ' + str((w+h)*2))


### FIXED CODE ###

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

print(str(w*h) + ' ' + str((w+h)*2))
n, x = input().split()
n = int(n)
x = int(x)
l = input().split()
a = 0

for i in range(n):
  a += int(l[i])
  if a > x:
    j = i
    break
    
print(j + 1)

### FIXED CODE ###

import sys

n, x = input().split()
n = int(n)
x = int(x)
l = input().split()
a = 0

for i in range(n):
  a += int(l[i])
  if a > x:
    print(i+1)
    sys.exit()
    
print(n+1)
N = int(input())
A = [int(i) for i in input().split()]
import numpy as np

A = np.array(A)

cnt = 0

while True:
  if (A%2).sum() == 0:
    A = A/2
    cnt += 1
  else
    break
print(cnt)

### FIXED CODE ###

N = int(input())
A = [int(i) for i in input().split()]
import numpy as np

A = np.array(A)

cnt = 0

while True:
    if (A%2).sum() == 0:
        A = A/2
        cnt += 1
    else:
        break
print(cnt)
N = map(int,input().split())
W = list(map(int,input().split()))

min_first = 10000
for i in range(N):
    m = abs(sum(W[0:i])-sum(W[i:])
    if m < min_first:
        m = min_first
    else:
        pass
print(m)

### FIXED CODE ###

n = int(input())
w = list(map(int, input().split()))
 
min_diff = 1000
for i in range(n):
	diff = abs(sum(w[0:i]) - sum(w[i:]))
	if diff < min_diff:
		min_diff = diff
print(min_diff)
from collections import Counter
from math import gcd

n = int(input())
xys = [tuple(map(int, input().split())) for _ in range(n)]
MOD = 998244353

excludes = 0
for i, (x1, y1) in enumerate(xys):
    slopes = []
    for x2, y2 in xys[i + 1:]:
        dx, dy = x2 - x1, y2 - y1
        if dx == 0:
            slopes.append(1j)
        elif dy == 0:
            slopes.append(1)
        else:
            m = gcd(dx, dy)
            slopes.append(dx // m + dy // m * 1j)
    for c in Counter(slopes).values():
        if c > 1:
            excludes += 2 ** c - c - 1
    excludes %= MOD

print((pow(2, n, MOD) - excludes - (n * (n - 1) // 2) - n - 1) % MOD)


### FIXED CODE ###

from collections import Counter
from fractions import gcd

n = int(input())
xys = [tuple(map(int, input().split())) for _ in range(n)]
MOD = 998244353

excludes = 0
for i, (x1, y1) in enumerate(xys):
    slopes = []
    for x2, y2 in xys[i + 1:]:
        dx, dy = x2 - x1, y2 - y1
        if dx == 0:
            slopes.append(1j)
        elif dy == 0:
            slopes.append(1)
        else:
            m = gcd(dx, dy)
            slopes.append(dx // m + dy // m * 1j)
    for c in Counter(slopes).values():
        if c > 1:
            excludes += 2 ** c - c - 1
    excludes %= MOD

print((pow(2, n, MOD) - excludes - (n * (n - 1) // 2) - n - 1) % MOD)
N = int(input())
A = list(map(int, input().split()))
A.append(0)
A.append(0)

ans = 0
doubles = set()
singles = set()
if A[0] == A[1]:
  doubles.add(A[0])
  singles.add(A[0])
else:
  singles.add(A[0])
  singles.add(A[1])
  
for i in range(0, N):
  a = A[2+3*i] 
  b = A[2+3*i+1]
  c = A[2+3*i+2]
  #print(ans, doubles, singles, a, b, c)
  if a == b == c:
    ans += 1
    continue
  d = None
  if a == b or b == c:
    d = b
  if  c == a:
    d = a
  #print(d)
  if d == None:
    match = False
    for x in (a, b, c):
      if x in doubles:
        match = True
        break
    if match:
      doubles.clear()
      singles.remove(x)
      for x2 in (a, b, c):
        if x2 != x:
          singles.append(x2)
      
      ans += 1
      continue
    else:
      for x in (a, b, c):
        singles.append(x)
  else:
    for x in (a, b, c):
      if x != d:
        s = x
    if d in singles:
      if s in singles:
        doubles.add(s)
      singles.add(s)
      if d in doubles:
        doubles.clear()
        ans+=1
        continue
      else:
        doubles.clear()
        singles.remove(d)
        ans += 1
        continue
        
    if s in doubles:
        doubles.clear()
        singles.remove(s)
        singles.add(d)
        doubles.add(d)
        ans+=1
        continue
    if s in singles:
        doubles.add(s)
    else:
        singles.add(s)
    singles.add(d)
    doubles.add(d)
#print(doubles)
print(ans)
    
    
        

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
N = len(A) // 3
A = A[:3*N]
#print(N, A)
A.append(0)
A.append(0)

ans = 0
def ind(a, b):
  t = sorted((a, b))
  return t[0] * (N+1) + t[1]
def inv(i):
  b = i % (N+1)
  a = i // (N + 1)
  return a, b

dp = [-1] * (N+1)**2
dp[ind(A[0],A[1])] = 0
current_max = 0
dp1 = [-1] * (N+1)
dp1[A[0]] = 0
dp1[A[1]] = 0

ans = 0
for i in range(0, N):
  a = A[2+3*i] 
  b = A[2+3*i+1]
  c = A[2+3*i+2]
  #print(a,b,c)
  if a == b == c:
    ans+=1
    continue
  dp_new = {}
  for x, y, z in [(a, b, c), (b, c, a), (c, a, b)]:
    # choose 1 (x), leave y, z
    i = ind(y, z)
    if i not in dp_new:
      dp_new[i] = 0
    dp_new[i] = max(dp_new[i], current_max)
    if dp[ind(x, x)] >= 0:
      dp_new[i] = max(dp_new[i], dp[ind(x, x)] + 1)
    
    # choose 2 (x, y), leave t, z
    for t in range(1, N+1):
      i = ind(t,z)
      # Not making three
      if dp1[t] >= 0:
        if i not in dp_new:
          dp_new[i]=0
        dp_new[i] = max(dp_new[i], dp1[t])
      # Making three (x==y)
      if x == y and dp[ind(t, x)] >= 0:
        if i not in dp_new:
          dp_new[i] = 0
        dp_new[i] = max(dp_new[i], dp[ind(t, x)] + 1)
        
  #print(a,b,c)
  #print({inv(i):v for i, v in dp_new.items() })
  for i, s in dp_new.items():
    dp[i] = max(dp[i], s)
    ta, tb = inv(i)
    dp1[ta] = max(dp1[ta], s)
    dp1[tb] = max(dp1[tb], s)
    current_max = max(current_max, s)

#print(doubles)
print(ans + max(dp1))
x=int(input())
def factorial(n):
  a=1
  if n==1:
    return a
  else:
    a= n*factorial(n-1)
    return a
print(factorial(x)%(10**9+7))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
x=int(input())
def factorial(n):
  a=1
  if n==1:
    return a
  else:
    a= n*factorial(n-1)
    return a%(10**9+7)
print(factorial(x))
n = int(input())
for i in range(3,n+1):
  x = i
  if x % 3 == 0:
    print(' {0}'.format(i), end='')
    continue

  while x != 0:
    if x % 10 == 3:
      print(' {0}.format(i), end='')
      break
    x //= 10

print()

### FIXED CODE ###

n = int(input())
for i in range(3,n+1):
  x = i
  if x % 3 == 0:
    print(' {0}'.format(i), end='')
    continue

  while x != 0:
    if x % 10 == 3:
      print(' {0}'.format(i), end='')
      break
    x //= 10

print()
N, K = map(int, input().split())
h = list(map(int, input().split()))
t = pow(10,10)
dp_h = [t] * N
dp_h[1] = abs(h[1] - h[0])
for i in range(2,N):
  for j in range(min(i, K)):
    tmp = abs(h[i] - h[i - j - 2]) + dp_h[i-j-2]
    if h[i] - h[i-j-2] == 0:
      tmp_min = tmp
      break
    if tmp < tmp_min:
      tmp_min = tmp
  dp_h[i] = tmp_min
print(dp_h[N-1])


### FIXED CODE ###

import numpy as np
N, K = map(int, input().split())
h = list(map(int, input().split()))
h = np.array(h)
dp = np.zeros(N, dtype = int)
for i in range(1, N):
  j = max(0,i - K)
  dp[i] = np.min(dp[j:i] + np.abs(h[i] - h[j:i]))
print(dp[N-1])
list=[int(i) for i in input().split()]

if list[0]>list[1]:
    a=list[0]
    b=list[1]
else:
    b=list[0]
    a=list[1]    

if a%b==0:
    print (b)
else:
    while a%b!=0:
        c=a%b
        a=b
        b=c

print(c)



### FIXED CODE ###

list=[int(i) for i in input().split()]

if list[0]>list[1]:
    a=list[0]
    b=list[1]
else:
    b=list[0]
    a=list[1]    


if a%b==0:
    print(b)
else:
    while b>0:
        c=a%b
        a=b
        b=c
    print(a)
s = input()
a = list(s)
result = 700
for i in a:
  if a[i] == o:
    result += 100
print(result)

### FIXED CODE ###

s = input()
a = list(s)
result = 700
for i in a:
  if i == "o":
    result += 100
print(result)
a = [i for i in int(input().split())]
print(a[0]*a[1], sum(a))


### FIXED CODE ###

a,b = [int(x) for x in input().split()]
print(a*b,2*(a+b))
import sympy
def euqlid(x,y):
    if x < y:
        tmp = x
        x  = y
        y = tmp
    while x % y != 0:
        tmp = x % y
        x = y
        y = tmp
    return y
a, b = map(int, input().split())
k = euqlid(a, b)
data = sympy.factorint(k)
print(len(data) + 1)

### FIXED CODE ###

import math
def euqlid(x,y):
    while x % y != 0:
        tmp = x % y
        x = y
        y = tmp
    return y
a, b = map(int, input().split())
if a < b:
    tmp = a
    a = b
    b = tmp
k = euqlid(a, b)
sum = 0
i = 2
if k == 1:
    print(1)
    exit()
while i <= math.sqrt(k):
    flag = False
    while k % i == 0:
        k = k // i
        flag = True
    if flag:
        sum += 1
    i += 1
if i <= k:
    sum += 1
print(sum + 1)
# coding: utf-8


def main():
    X, Y = map(int, input().split())
    ans = 0
    while (X <= Y){
        x *= 2
        ans += 1
    }
    print(ans)

if __name__ == "__main__":
    main()


### FIXED CODE ###

# coding: utf-8


def main():
    X, Y = map(int, input().split())
    ans = 0
    while X <= Y:
        X *= 2
        ans += 1

    print(ans)

if __name__ == "__main__":
    main()
N, K = map(int, input().split())
l = list(map(int, input().split()))
first = True
for i in range(K):
  s = 0
  
  for j in l:
    s += i ^ j
    
  if first:
    m = s
    first = False
  else:
    if m < s:
      m = s
print(m)

### FIXED CODE ###

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

max_bit = 40
ans = 0
for i in range(max_bit, -1, -1):
  bit = 2 ** i
  c = len([1 for j in a if j&bit > 0])
  if 2*c < N and bit <= K:
    c = N - c
    K -= bit
  ans += bit * c
print(ans)
# -*- coding:UTF-8 -*-
import sys

print(int(sys.argv[1]) ** 3)

### FIXED CODE ###

# -*- coding:UTF-8 -*-
print(int(input()) ** 3)
def resolve():
    import math
    A, B, C, D = map(int, input().split())
    lcm = C*D//math.gcd(C, D)
    A = A-1
    print((B-B//C-B//D+B//lcm)-(A-A//C-A//D+A//lcm))
resolve()

### FIXED CODE ###

def resolve():
    A, B, C, D = map(int, input().split())
    d = D
    c = C
    gcd = 0
    while gcd == 0:
        if d % c == 0:
            gcd = c
        else:
            e = d%c
            d = c
            c = e
    lcm = C*D//gcd
    A = A-1
    print((B-B//C-B//D+B//lcm)-(A-A//C-A//D+A//lcm))
resolve()
a,b = map(int, input().split())

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

### FIXED CODE ###

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

if (a % 2 == 0 or b % 2 == 0):
  print('Even')
else:
  print('Odd')
H,N=[int(x)for x in input().split()] attack=[int(x) for x in input().split()]
print("Yes"if H- sum(attack)<= 0 else "No")

### FIXED CODE ###

H,N=[int(x)for x in input().split()]
attack=[int(x) for x in input().split()]
print("Yes"if H- sum(attack)<= 0 else "No")
n=int(input())
print((n+n**2-3-3(n//3)-3((n//3)**2)-5(n//5)-5((n//5)**2)+15(n//15)+15((n//15)**2))/2)

### FIXED CODE ###

n=int(input())
print((n+n**2-3*(n//3)*(1+(n//3))-5*(n//5)*(1+(n//5))+15*(n//15)*(1+(n//15)))//2)
hoge = str(input())
a = int(hoge[:2])
b = int(hoge[2:4])

if a == 0 or b == 0:
  result = "NA"

if 0 < a and a < 12:
  result = "YYMM"
  if 0 < a and a < 12:
    result = "AMBIGUOUS"
if 0 < b and b < 12:
  result = "MMYY"
  if 0 < a and a < 12:
    result = "AMBIGUOUS"

print(result)

### FIXED CODE ###

hoge = str(input())
a = int(hoge[:2])
b = int(hoge[2:4])
result = None

if 0 < a and a <= 12:
  result = "MMYY"
  if 0 < b and b <= 12:
    result = "AMBIGUOUS"
if 0 < b and b <= 12:
  result = "YYMM"
  if 0 < a and a <= 12:
    result = "AMBIGUOUS"
if result == None:
  result = "NA"

print(result)
def main():
    ints = (int(_) for _ in input().split(' '))
    if any(_ % 2 == 0 for _ in ints):
        print(0)
        return
    t = max(ints)
    x, y, z = ints
    if t == x:
        print(y * z)
    elif t == y:
        print(x * z)
    elif t == z:
        print(x * y)


if __name__ == '__main__':
    main()


### FIXED CODE ###

if __name__ == '__main__':
    x, y, z = (int(_) for _ in input().split(' '))
    a = max((x, y, z))
    if a == x:
        b, c = y, z
    elif a == y:
        b, c = x, z
    elif a == z:
        b, c = x, y
    print(abs(a // 2 * b * c - (a - a // 2) * b * c))
import sys
input = sys.stdin.readline

MOD = 10 ** 9 + 7


def main():
    N, M = map(int, input().split())
    memo = [0] * (N + 1)
    a = [0] * M

    if N == 1:
        print(1)
        return
    elif N == 2:
        print(2)
        return
    elif N == 3:
        print(3)
        return

    memo[0] = 0
    memo[1] = 1
    memo[2] = 2
    for i in range(3, N+1):
        memo[i] = memo[i-1] + memo[i-2]

    # print(memo)
    ans = 1

    for i in range(M):
        a[i] = int(input())

        if i != 0 and abs(a[i] - a[i-1]) == 1:
            print(0)
            return

        if a[i] == 1:
            ans *= 1
        elif i == 0:
            ans *= memo[a[i] - 1]
            ans %= MOD
            # print(a[i], ans, a[i] - 1)
        else:
            ans *= memo[a[i] - a[i-1] - 2]
            ans %= MOD
            # print(a[i], ans, a[i] - a[i-1] - 2)

    ans *= memo[N - a[M-1] - 1]
    ans %= MOD
    # print(ans, N - a[M-1] - 1)
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

MOD = 10 ** 9 + 7


def main():
    N, M = map(int, input().split())
    memo = [0] * max((N + 1), 10)
    a = [0] * M

    memo[0] = 1
    memo[1] = 1
    memo[2] = 2
    for i in range(3, max(N+1, 10)):
        memo[i] = memo[i-1] + memo[i-2]

    # print(memo)
    ans = 1

    for i in range(M):
        a[i] = int(input())

        if i != 0 and abs(a[i] - a[i-1]) == 1:
            print(0)
            return

        if a[i] == 1:
            ans *= 1
        elif i == 0:
            ans *= memo[a[i] - 1]
            ans %= MOD
            # print(a[i], ans, a[i] - 1)
        else:
            ans *= memo[a[i] - a[i-1] - 2]
            ans %= MOD
            # print(a[i], ans, a[i] - a[i-1] - 2)

    if M == 0:
        ans *= memo[N]
        ans %= MOD
        # print(ans, N - a[M-1] - 1)
        print(ans)
    else:
        ans *= memo[N - a[M-1] - 1]
        ans %= MOD
        # print(ans, N - a[M-1] - 1)
        print(ans)


if __name__ == '__main__':
    main()
n = int(input())
i = 1

while True:
    x = i
    if  x % 3 == 0 or x % 10 ==3 or x / 10 == 0:
        print(" %d" i)
    i+=1
    if i > n:
        print()
        break


### FIXED CODE ###

#
# 5d
#

def main():
    n = int(input())
    s = ""
    for i in range(1, n+1):
        x = i
        if x % 3 == 0 or x % 10 == 3:
            s += " " + str(i)
        else:
            x //= 10
            while x:
                if x % 10 == 3:
                    s += " " + str(i)
                    break
                x //= 10
    print(s)


if __name__ == '__main__':
    main()
def main():
  n=int(input())
  arr=list(map(int,input.split()))
  prod=1
  for i in range(0,n):
    prod*=arr[i]
    if(prod>=1000000000000000000):
      print(-1)
      return
    
  print(prod)

  
main()

### FIXED CODE ###

def main ():
  N = int(input())
  A = list(map(int,input(). split ()))
  if 0 in A:
    print(0)
    return
  prod = 1
  for a in A:
    prod *= a
    if prod > 1000000000000000000:
      print(-1)
      return
    
  print(prod)
main ()
if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)

### FIXED CODE ###

if __name__ == '__main__':
    n = int(input())
    cardlist = list(map(int, input().split()))
    cardlist.sort()

    alice_s, bob_s = 0, 0
    while cardlist != []:
        alice_s += cardlist.pop()
        if cardlist == []:
            break
        bob_s += cardlist.pop()
    ans = alice_s - bob_s
    print(ans)
import math

def P(n, r):
    if n == 1 or 0:
        return 0
    return math.factorial(n)//math.factorial(n-r)


def C(n, r):
    return P(n, r)//math.factorial(r)

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

print(C(n, 2) + C(m, 2))

### FIXED CODE ###

import math

def P(n, r):
    if n < r:
        return 0
    return math.factorial(n)//math.factorial(n-r)


def C(n, r):
    return P(n, r)//math.factorial(r)

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

print(C(n, 2) + C(m, 2))
# 8 = 2 * 2 * 2
# 6 = 2 * 3
x = int(input())
y = int(input())
result = 0

if x % y == 0:
    result = -1
else:
    result = x
print(result)


### FIXED CODE ###

# 8 = 2 * 2 * 2
# 6 = 2 * 3
x,y= map(int,(input().split()))

result = 0

if x % y == 0:
    result = -1
else:
    result = x 


print(result)
import itertools

def path(n):
    l = len(n)
    i = 0
    while i < l - 1:
        a = n[i]
        b = n[i + 1]

        if a < b:
            c = (a, b)
        else:
            c = (b, a)

        for m in C:
            if m == c:
                break
        else:
            return False
        i += 1
    return True

N, M = map(int, input().split())
C = []
i = 0
while i < N:
    C += [tuple(map(int, input().split()))]
    i += 1

i = 0
l = range(1, N + 1)
for n in itertools.permutations(l, N):
    if n[0] != 1:
        break
    if path(n) == True:
        i += 1
print(i)

### FIXED CODE ###

import itertools

def path(n):
    l = len(n)
    i = 0
    while i < l - 1:
        a = n[i]
        b = n[i + 1]

        if a < b:
            c = (a, b)
        else:
            c = (b, a)

        for m in C:
            if m == c:
                break
        else:
            return False
        i += 1
    return True

N, M = map(int, input().split())
C = []
i = 0
while i < M:
    C += [tuple(map(int, input().split()))]
    i += 1

i = 0
l = range(1, N + 1)
for n in itertools.permutations(l, N):
    if n[0] != 1:
        break
    if path(n) == True:
        i += 1
print(str(i))
def read_n_lows_input(n):
    Alist=[int(input()) for i in range(n)]
    return Alist

def max_profit(A, n):
    minv = A[0]
    for j in range(1, n):
        if j == 1:
            maxv = A[j] - A[j-1]
        if maxv < A[j] - minv:
            maxv = A[j] - minv
        if minv > A[j]:
            minv = A[j]
    print(maxv)

n=int(input())

A = read_multi_low_input_with_num(n)

max_profit(A, n)


### FIXED CODE ###

def max_profit(A, n):
    minv = A[0]
    for j in range(1, n):
        if j == 1:
            maxv = A[j] - A[j-1]
        if maxv < A[j] - minv:
            maxv = A[j] - minv
        if minv > A[j]:
            minv = A[j]
    print(maxv)

n=int(input())
A=[int(input()) for i in range(n)]

max_profit(A, n)
#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections

A,B,C,K = map(int,sys.stdin.readline().split())

ALL = [1]*A+[0]*B+[-1]*C

print(sum(ALL[:K]))


### FIXED CODE ###

#!/usr/bin/env python3
# n,m = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(sys.stdin.readline() for _ in range(n)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(N)) # multi line with multi param
# s = sys.stdin.readline().rstrip()
# n = int(sys.stdin.readline())
# INF = float("inf")
import sys,collections

A,B,C,K = map(int,sys.stdin.readline().split())

#ALL = [1]*A+[0]*B+[-1]*C
#print(sum(ALL[:K]))
print(1*min(A,K)+0*min(B,max(K-A,0))-1*min(C,max(K-A-B,0)))
n, d = map(int,input().split())
cnt = 0
while(n--):
    p,q = map(int,input().split())
    if p**2 + q**2 <= d**2:
        cnt+=1
print(cnt)


### FIXED CODE ###

n,d = map(int, input().split())
ans = 0
for i in range(n):
  x, y = map(int, input().split()) 
  if x*x + y*y <= d*d: # since they have given atmost distance d
    ans+= 1
print(ans)
'''
using distance formula check whether the the distance 
from origin is less than x sq and y sq
'''
from fractions import gcd
from functools import reduce


def gcd_list(numbers):
    return reduce(fractions.gcd(), numbers)


n = int(input())
num_list = list(map(int,input().split()))
gcd = [1 for _ in range(n-1)]
for i in range(n-1):
    num = num_list[:i] + num_list[(i + 1):]
    gcd[i] = gcd_list(num)

print(max(gcd))

### FIXED CODE ###

# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


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

L = [0 for _ in range(n)]
R = [0 for _ in range(n)]
L[0] = A[0]
R[-1] = A[-1]

for i in range(1, n):
    L[i] = gcd(L[i-1], A[i])
    R[n - i - 1] = gcd(R[n - i], A[n - i - 1])
ans = 1
for i in range(n):
    if i == 0:
        ans = R[i + 1]
    elif i == n-1:
        ans = max(ans, L[i-1])
    else:
        ans = max(ans, gcd(L[i - 1], R[i+1]))

print(ans)
while 1 :
	m,f,r = map(int , raw_input().split())
	if m == -1 and f == -1 and r == -1 :
		break
	 elif m == -1 or f == -1:
        print 'F'
   elif m + f >= 80:
       print 'A'
   elif m + f >= 65:
       print 'B'
   elif m + f >= 50:
        print 'C'
   elif m + f >= 30:
       if r >= 50:
           print 'C'
       else:
          print 'D'
	  else:
       print 'F'

### FIXED CODE ###

while 1 :
	m,f,r = map(int , raw_input().split())
	
	s = m + f
	
	if m == f == r == -1 :
		break
	elif m == -1 or f == -1 or s < 30 :
		print "F"
	elif s >= 80 :
		print "A"
	elif s >= 65 :	
		print "B"
	elif s >= 50 : 
		print "C"
	elif s >= 30 and r >= 50 :
		print "C"
	else :
		print "D"
N=int(input())
print("No" if N in [1,2,3,5,6,9,10,13,17] else "Yes")

### FIXED CODE ###

N,K=map(int,input().split())
print(0 if N%K==0 else 1)
import numpy as np
MOD = 10**9 + 7


def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2, N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum


N = int(input())
N_list = seachPrimeNum(N)
ans_list = [0 for i in range(len(N_list))]
for i in range(2, N+1):
    temp_i = i
    for j in range(len(N_list)):
        while temp_i % N_list[j] == 0:
            temp_i = temp_i // N_list[j]
            ans_list[j] += 1
ans = 1
for i in range(len(ans_list)):
    ans = ans * (ans_list[i]+1) % MOD
print(ans)


### FIXED CODE ###

import numpy as np
MOD = 10**9 + 7


def seachPrimeNum(N):
    max = int(np.sqrt(N))
    seachList = [i for i in range(2, N+1)]
    primeNum = []
    while seachList[0] <= max:
        primeNum.append(seachList[0])
        tmp = seachList[0]
        seachList = [i for i in seachList if i % tmp != 0]
    primeNum.extend(seachList)
    return primeNum


N = int(input())
if N == 1:
    print(1)
    exit()
N_list = seachPrimeNum(N)
ans_list = [0 for i in range(len(N_list))]
for i in range(2, N+1):
    temp_i = i
    for j in range(len(N_list)):
        while temp_i % N_list[j] == 0:
            temp_i = temp_i // N_list[j]
            ans_list[j] += 1
ans = 1
for i in range(len(ans_list)):
    ans = ans * (ans_list[i]+1) % MOD
print(ans)
#coding:utf-8

n = int(input())
nums = map(int, input().split(' '))

if a >= b:
    print(''.join([str(b)] * a))
else:
    print(''.join([str(a)] * b))

### FIXED CODE ###

#coding:utf-8

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


print(''.join([str(min(a, b))] * max(a, b)))
import sys
input=sys.stdin.readline
n=int(input())
l=[int(input()) for i in range(n)]
if l[0]!=0:
    print(-1)
    quit()
l.reverse()
ans=0
i=0
while i<n-2:
    if l[i]>n-i-1:
        print(-1)
        quit()
    if l[i+1]+1==l[i]:
        ans+=l[i]
        while l[i+1]+1==l[i]:
            i+=1
    elif l[i+1]+1<l[i]:
        print(-1)
        quit()
    else:
        ans+=l[i]
        i+=1
print(ans)

### FIXED CODE ###

import sys
input=sys.stdin.readline
n=int(input())
l=[int(input()) for i in range(n)]
if l[0]!=0:
    print(-1)
    quit()
l.reverse()
l+=[0]
ans=0
i=0
while i<n-1:
    if l[i]>n-i-1:
        print(-1)
        quit()
    if l[i+1]+1==l[i]:
        ans+=l[i]
        while l[i+1]+1==l[i]:
            i+=1
        i+=1
    elif l[i+1]+1<l[i]:
        print(-1)
        quit()
    else:
        ans+=l[i]
        i+=1
print(ans)