Harryxun/stf_run huggingface dataset:
n = int(input())
s = [int(x) for x in input().split()]

res = 'Three'
if 'Y' in s:
  res = 'Four'

print(res)


### FIXED CODE ###

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

res = 'Three'
if 'Y' in s:
  res = 'Four'

print(res)
import math

x1, x2, y1, y2 = map(int, raw_input().split(" "))

h = math.sqrt(pow(x1 - y1, 2) + pow(x2 - y2, 2))

print h

### FIXED CODE ###

import math

x1, x2, y1, y2 = map(float, raw_input().split(" "))

h = math.sqrt(pow(x1 - y1, 2) + pow(x2 - y2, 2))

print round(h, 8)
from itertools import permutations

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

path = [[False]*n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

for i in permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)


### FIXED CODE ###

from itertools import permutations

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

path = [[False]*n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

for i in permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)
def check(st,count):
    flag = False
    new_list = []
    for i in st:
        if i % 2 == 0:
            new_list.append(i)
        else:
            flag = True
            break
    if flag:
        print(count)
        return
    else:
      count += 1
      check(new_list, count)
      
n = int(input())
st = list(map(int, input().split()))
count = 0
check(st, count)



### FIXED CODE ###

def check(st,count):
    flag = False
    new_list = []
    for i in st:
        if i % 2 == 0:
            i = i // 2
            new_list.append(i)
        else:
            flag = True
            break
    if flag:
        print(count)
        return
    else:
      count += 1
      check(new_list, count)

n = int(input())
st = list(map(int, input().split()))
count = 0
check(st, count)
s = list(input())

i = 0
while i < len(s):
    if s[i] != "h" or s[i + 1] != "i":
        print("No")
        exit()
    i += 2

print("Yes")

### FIXED CODE ###

s = list(input())

i = 0
if len(s) % 2 != 0:
    print("No")
    exit()
while i < len(s):
    if s[i] != "h" or s[i + 1] != "i":
        print("No")
        exit()
    i += 2

print("Yes")
N, W = map(int, input().split())
dp = [[0] * (W+1) for _ in range(N+1)]
w, v = [0]*N, [0]*N
for i in range(N):
    w[i], v[i] = map(int,input().split())
for i in range(N):
    for weight in range(W+1):
        if 0 <= weight - w[i]:
            dp[i+1][weight] = max(dp[i][weight-w[i]]+v[i],dp[i][weight])
        else:
            dp[i+1][weight] = dp[i][w[i]]
print(dp[N][W])


### FIXED CODE ###

N, W = map(int, input().split())
w, v = [0]*N, [0]*N
for i in range(N):
    w[i], v[i] = map(int,input().split())
V = sum(v)
dp = [[float('inf')] * (V + 1) for _ in range(N+1)]
dp[0][0] = 0
for i in range(N):
    for value in range(V+1):
        if 0 <= value - v[i]:
            dp[i+1][value] = min(dp[i][value-v[i]]+w[i],dp[i][value])
        else:
            dp[i+1][value] = dp[i][value]
ans = 0
for i in range(V+1):
    if dp[N][i] <= W:
        ans = i
print(ans)
N = int(input())
L=[]
i = 0
s = 0
for i in range (0,N):
    L.append(int(input()))
M = L[0]
for s in range(1,N):
    if  L[s] > M:
        M = L[s]
i = 0
for i in range(0,N):
    F = L[0]
    for s in range(1,N):
        if f == M:
            continue
        else:
            if L[s] == L[i]:
                continue
            else:
                if L[s] > F:
                    F = L[s]
    print(F)



### FIXED CODE ###

N = int(input())
L=[]
i = 0
s = 0
M2 = 0
a = 0
for i in range (0,N):
    L.append(int(input()))
M = L[0]
for s in range(1,N):
    if  L[s] > M:
        M = L[s]
for s in range(0,N):
    if L[s] == M:
        a += 1
    else:
        if L[s] > M2:
            M2 = L[s]
for i in range(0,N):
    if L[i] == M and a < 2:
        print(M2)
    else:
        print(M)
from sys import stdin

A,B,C = [int(x) for x in stdin.realine().rstrip().split()]

if A+B+C == 17 and A>=5 and B>=5 and C>=5:
  print("YES")
else:
  print("NO")
  

### FIXED CODE ###

from sys import stdin

A,B,C = [int(x) for x in stdin.readline().rstrip().split()]

if A + B + C == 17 and A >= 5 and B >= 5 and C >= 5:
        print("YES")
else:
        print("NO")
n, m = map(int, input().split())

li = []
for _ in range(m):
    li.append(list(map(int, input().split())))


def check(i, l, r):
    if i == m:
        try:
            return r - l + 1
        except:
            return 0

    l_, r_ = li[i]
    nl = max(l, l_)
    nr = min(r, r_)
    return check(i + 1, nl, nr)


l, r = li[0]
print(check(1, l, r))


### FIXED CODE ###

n, m = map(int, input().split())
l, r = map(int, input().split())
li = []


for _ in range(m - 1):
    l_, r_ = map(int, input().split())
    l = max(l, l_)
    r = min(r, r_)


print(max(r - l + 1, 0))
flag = False
def check(sen,l,s):
    if len(sen)<l:
        check(sen+"dream",l,s)
        check(sen+"dreamer",l,s)
        check(sen+"erase",l,s)
        check(sen+"eraser",l,s)
    else:
        if sen==s:
            global flag
            flag = True

s = input()

check("",len(s),s)

if flag:
    print("yes")
else:
    print("no")

### FIXED CODE ###

import re
s = input()
m = re.fullmatch(r"(dreamer|dream|erase|eraser)+", s)

if m:
    print("YES")
else:
    print("NO")
sho = int(input()) // 60
amari = int(input()) % 60

h = sho // 60
m = sho % 60
s = amari

print("{}:{}:{}".format(h, m, s))


### FIXED CODE ###

sho, s = divmod(int(input()), 60)
h, m = divmod(sho, 60)
print("{}:{}:{}".format(h, m, s))
h,w,m,*t = map(int,open(0).read().split())
a = [[0]*w for _ in range(h)]
ht = [0]*h
wt = [0]*w
for i in range(m):
  y,x = t[i*2]-1,t[i*2+1]-1
  a[y][x] += 1
  ht[y] += 1
  wt[x] += 1
htm = max(ht)
wtm = max(wt)
htt = [i for i in range(h) if ht[i]==htm]
wtt = [i for i in range(w) if wt[i]==wtm]
ans = 0
for i in htt:
  for j in wtt:
    ans = max(ans,ht[i]+wt[j]-a[i][j])
print(ans)

### FIXED CODE ###

h,w,m = map(int,input().split())
t = [tuple(map(lambda x:int(x)-1,input().split())) for _ in range(m)] 
ht = [0]*h
wt = [0]*w
for y,x in t:
  ht[y] += 1
  wt[x] += 1
htm = max(ht)
wtm = max(wt)
htt = [i for i in range(h) if ht[i]==htm]
wtt = [i for i in range(w) if wt[i]==wtm]
ans = htm+wtm-1
t = set(t)
for i in htt:
  for j in wtt:
    if (i,j) not in t:
      print(htm+wtm)
      exit()
print(htm+wtm-1)
N = int(input())
from collections import defaultdict
d = defaultdict(int)
for i in map(int,input().split()):
  for idx,j in enumerate(reversed('{:b}'.format(i))):
    if j == "1":
      d[idx]+=1

m = max( set(d.keys()) )
print(int(sum([((2**i)* (N-d[i])*d[i])%(1e9+7) for i in range(m+1)])%(1e9+7)))

### FIXED CODE ###

N = int(input())
from collections import defaultdict
d = defaultdict(int)
for i in map(int,input().split()):
  for idx,j in enumerate(reversed('{:b}'.format(i))):
    if j == "1":
      d[idx]+=1

m = max( set(d.keys())|set([0]))
print(int(sum([((2**i)* (N-d[i])*d[i])%(1e9+7) for i in range(m+1)])%(1e9+7)))
n = int(input())
e = [[] for _ in range(n)]
for _ in range(n - 1):
    a, b = [int(i) - 1 for i in input().split()]
    e[a].append(b)
    e[b].append(a)

mod = 10**9+7
kkai = [1]
for i in range(1, n * 10):
    kkai.append(kkai[-1]*i % mod)


def kai(x, p=mod):
    return kkai[x]


def comb(a, b, p=mod):
    if a < 0 or b < 0:
        return 0
    elif a < b:
        return 0
    c = 1
    c *= kai(a, p)
    c *= pow(kai(b, p), p - 2, p)
    c *= pow(kai(a - b, p), p - 2, p)
    return c % p


child = [0] * n
pa = [-1] * n


def dfs_ch(i=0, r=-1):
    pa[i] = r
    c = 1
    for j in e[i]:
        if j != r:
            c += dfs_ch(j, i)
    child[i] = c
    return c


dfs_ch()

f = [0] * n


def dfs_f(i=0, r=-1):
    c = 1
    d = child[i]-1
    for j in e[i]:
        if j != r:
            c *= comb(d, child[j])
            d -= child[j]
            c *= dfs_f(j, i)
            c %= mod
    f[i] = c
    return c


dfs_f()
g = [0] * n


def dfs_g(i=0, r=-1, c=1):
    if r != -1:
        d = n - child[i]-1
        for j in e[r]:
            if j != i:
                if j == pa[r]:
                    pass
                else:
                    c *= f[j]
                    c *= comb(d, child[j])
                    d -= child[j]
                    c %= mod
    g[i] = c
    for j in e[i]:
        if j != r:
            dfs_g(j, i, c)


dfs_g()

for i in range(n):
    print(f[i]*g[i]*comb(n-1, child[i]-1) % mod)



### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)


def input():
    return sys.stdin.readline()


n = int(input())
e = [[] for _ in range(n)]
for _ in range(n-1):
    a, b = [int(i) - 1 for i in input().split()]
    e[a].append(b)
    e[b].append(a)

mod = 10**9+7

kkai = [1]
for i in range(1, 2*10 ** 5):
    kkai.append(kkai[-1] * i % mod)


def kai(x, p=mod):
    return kkai[x]


def comb(a, b, p=mod):
    if a < 0 or b < 0:
        return 0
    elif a < b:
        return 0
    if b == 0:
        return 1
    c = 1
    c *= kai(a, p)
    c *= pow(kai(b, p), p - 2, p)
    c *= pow(kai(a - b, p), p - 2, p)
    return c % p


child = [0] * n


def dfs1(i=0, r=-1):
    s = 1
    for j in e[i]:
        if j == r:
            continue
        s += dfs1(j, i)
    child[i] = s
    return s


dfs1()
a = [0] * n


def dfs2(i=0, r=-1):
    s = kai(child[i]-1)
    t = 1
    for j in e[i]:
        if j == r:
            continue
        s *= dfs2(j, i)
        s %= mod
        t *= kai(child[j])
        t %= mod
    s *= pow(t, mod - 2, mod)
    s %= mod
    a[i] = s
    return s


dfs2()
b = [0] * n


def dfs3(i=0, r=-1):
    if r == -1:
        b[i] = a[i]
    else:
        s = b[r] * child[i] % mod
        s *= pow(n-child[i], mod - 2, mod)
        s %= mod
        b[i] = s

    for j in e[i]:
        if j == r:
            continue
        dfs3(j, i)


dfs3()
print("\n".join(map(str, b)))
N=int(input().strip())

xyh=[]
for i in range(N):
    xi,yi,hi = map(int, input().split(' '))
    if hi>0:
        xtst=xi
        ytst=yi
        htst=hi
    xyh.append([xi,yi,hi])

for ny in range(101):
    for nx in range(101):
        nh=abs(xtst-nx)+abs(ytst-ny)+htst
        nh=max(nh,0)
        fl=True
        for lis in xyh:
                if lis[2]!=max(0,nh-abs(lis[0]-nx)+abs(lis[1]-ny)):
                    fl=False
        if fl:
            ax=nx
            ay=ny
            ah=nh

print("{} {} {}".format(ax,ay,ah))

### FIXED CODE ###

N=int(input().strip())
xyh=[]
for i in range(N):
    xi,yi,hi = map(int, input().split(' '))
    xyh.append([xi,yi,hi])
    if hi>=1:
        xyhset=[xi,yi,hi]
        
for nx in range(101):
    for ny in range(101):
        He = xyhset[2]+abs(xyhset[0]-nx)+abs(xyhset[1]-ny)
        He=max(0,He)
        flag=True
        for i in range(N):
            h=He-abs(xyh[i][0]-nx)-abs(xyh[i][1]-ny)
            h=max(0,h)
            if xyh[i][2]!=h:
                flag=False
        if flag:
            ax=nx
            ay=ny
            ah=He

print("{} {} {}".format(ax,ay,ah))
n = int(input())
A = list(map(int, input().split()))[::-1]
B = []
t = 0
before = A[0] - 1
max_t = 0
for i in A:
    if before <= i:
        t += 1
        before = i
    else:
        B.append(t)
        t = 1
        before = i

print(max(B)-1)

### FIXED CODE ###

n = int(input())
A = list(map(int, input().split()))[::-1]
B = []
t = 0
before = A[0] - 1
max_t = 0
for i in A:
    if before <= i:
        t += 1
        before = i
    else:
        B.append(t)
        t = 1
        before = i
B.append(t)
if n == 1:
    print(0)
else:
    print(max(B)-1)
s = input()
    print("no" if s == "AAA" or s == "BBB" else "yes")

### FIXED CODE ###

if __name__ == '__main__':
    s = input()
    print("No" if s == "AAA" or s == "BBB" else "Yes")
x,t=list(map(int,input().split()))
if x > t:
    print(x-t)
else:
    prit(0)
    

### FIXED CODE ###

x,t=list(map(int,input().split()))
if x > t:
    print(x-t)
else:
    print(0)
import math
n, a, b = map(int,input().split())
score = 1
total = 0
if n % = 1:
  for i in range(1,n//2+1):
  score = score * (n-i+1) // i
  if i != a and i != b and i != n-a and i != n-b:
    total += 2 * score
  else:
    total += score
else:
  for i in range(1,n//2):
  score = score * (n-i+1) // i
  if i != a and i != b and i != n-a and i != n-b:
    total += 2 * score
  else:
    total += score
  k = n//2 
  if k != a and k != b and k != n-a and K != n-b:
    total + score * (n-k+1) // k
print(total % (10**9 + 7))


### FIXED CODE ###

N, a, b = map(int,input().split())
p = pow(10,9) + 7
def comb(n,r):
  bunshi = 1
  for i in range(n-r+1, n+1):
    bunshi =bunshi * i % p
  bunbo = 1
  for i in range(1, r+1):
    bunbo = bunbo * i % p
  return bunshi * pow(bunbo, p-2, p)
print((pow(2,N, p) - 1 - comb(N,a) - comb(N,b)) % p)
a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if i+*500+j*100+k*50 == x:
        ans += 1
print(ans)

### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
x = int(input())
ans = 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      if i*500+j*100+k*50 == x:
        ans += 1
print(ans)
import math
import os
import sys
from fractions import gcd
from decimal import *

from libs.debug import debug

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

A, B, C, D = list(map(int, sys.stdin.readline().split()))
A = Decimal(A)
B = Decimal(B)
C = Decimal(C)
D = Decimal(D)


def count(n):
    st = math.ceil(A / n)
    en = math.floor(B / n)
    return max(0, en - st + 1)


print(B - A + 1 - (count(C) + count(D) - count(C * D // gcd(C, D))))

#
# N = int(sys.stdin.readline())
# A, B = list(zip(*[map(int, sys.stdin.readline().split()) for _ in range(N)]))


### FIXED CODE ###

import math
import os
import sys
from decimal import *
from fractions import gcd

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

A, B, C, D = list(map(int, sys.stdin.readline().split()))
A = Decimal(A)
B = Decimal(B)
C = Decimal(C)
D = Decimal(D)


def count(n):
    st = math.ceil(A / n)
    en = math.floor(B / n)
    return max(0, en - st + 1)


print(B - A + 1 - (count(C) + count(D) - count(C * D // gcd(C, D))))

#
# N = int(sys.stdin.readline())
# A, B = list(zip(*[map(int, sys.stdin.readline().split()) for _ in range(N)]))
import sys
import math
import numpy as np
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
INF = 10**9
mod = 10**9+7

N,M = I()
L = [l() for _ in range(N)]
A = []
B = []
L.sort()
ans = 0
for a,b in L:
    A.append(a)
    B.append(b)
for i in range(1,M+1):
    i = bisect.bisect_right(A,i)
    if i == 0:
        continue
    v = max(B[:i])
    i2 = B.index(v)
    A.pop(i2)
    B.pop(i2)
    ans += v
print(ans)

### FIXED CODE ###

import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10**9)
INF = 10**9
mod = 10**9+7
import heapq

N,M = I()
L = [l() for _ in range(N)]
A = deque([])
B = deque([])
L.sort()
ans = 0
for a,b in L:
    A.append(a)
    B.append(b)
q = []
heapq.heapify(q)
for i in range(1,M+1):
    for j in range(len(A)):
        if A[0] > i:
            break
        else:
            A.popleft()
            heapq.heappush(q,B.popleft()*-1)
    if q:
        ans += heapq.heappop(q)*-1
print(ans)
import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(n):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])

### FIXED CODE ###

import collections
n = int(input())
s = []
for i in range(n):
    s.append(input())
    
dic = collections.Counter(s)
dic = dic.most_common()

ans = [dic[0][0]]

for i in range(len(dic)-1):
    if dic[i][1] == dic[i+1][1]:
        ans.append(dic[i+1][0])
    else:
        break
        
ans = sorted(ans)

for i in range(len(ans)):
    print(ans[i])
S = input()

S = S[::-1]

l = ['dream','dreamer','erase','eraser']
L = []
for i in l:
    L.append(i[::-1])
print(L)
num=0
def rec(s):
    flag=False
    for ii in L:
        leng = len(ii)
        if len(s)<leng:
            continue
        else:
            if s[num:leng]==ii:
                if len(s)==leng:
                    flag=True
                    break
                else:
                    return rec(s[leng:])
            else:
                continue
    return flag
f = rec(S)
if f:
    print('YES')
else:
    print('NO')

### FIXED CODE ###

S = input()
S = S[::-1]
l = ['dream','dreamer','erase','eraser']
L = []
pos = 0
f=True

for i in l:
    L.append(i[::-1])

while pos < len(S):
    no_match = True
    for candidate in L:
        if S[pos:pos+len(candidate)]==candidate:
            pos+=len(candidate)
            no_match =False
            break
    if no_match:
        f =False
        break


if f:
    print('YES')
else:
    print('NO')
print(x,3)

### FIXED CODE ###

x = int(input())
print (x ** 3)
a = sorted(input(), reverse=True)
b = sorted(input(), reverse=True)
aa = ''.join(a)
bb = ''.join(b)
ans = 'Yes'
for i in range(len(aa)):
  if aa[i] == bb[i]: continue
  if aa[i] < bb[i]:
    break
  else:
    ans = 'No'
    break
print(ans)

### FIXED CODE ###

a = sorted(input())
b = sorted(input(), reverse=True)
aa = ''.join(a)
bb = ''.join(b)
if aa < bb:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
dir = [[] for _ in range(m+1)]

for i in range(m):
    ta, tb = map(int, input().split())
    dir[ta].append(tb)
    dir[tb].append(ta)

ans = [0]*(n+1)
flag = [False]*(n+1)
flag[1] = True
que = [1]
while len(que) != 0:
    #print('que: ', len(que), que)
    now = que.pop()
    for to in dir[now]:
        if flag[to]:
            continue
        que.append(to)
        flag[to] = True
        ans[to] = now
"""         print(to)
        ans[to] = now
        flag[to] = 1
        for toto in dir[to]:
            if flag[toto] != 1:
                que.append(toto) """
print('Yes')
for i in range(2,n+1):
    print(ans[i])

### FIXED CODE ###

from collections import deque
n, m = map(int, input().split())
dir = [[] for _ in range(n+1)]

for i in range(m):
    ta, tb = map(int, input().split())
    dir[ta].append(tb)
    dir[tb].append(ta)

ans = [0]*(n+1)
flag = [False]*(n+1)
flag[1] = True
que = deque([1])
while que:
    #print('que: ', len(que), que)
    now = que.popleft()
    for to in dir[now]:
        if flag[to]:
            continue
        que.append(to)
        flag[to] = True
        ans[to] = now

print('Yes')
for i in range(2,n+1):
    print(ans[i])
N, M, X = map(int,input().split())
AL, AR = [],[]
for i in range(M):
  a = int(input())
  if a < X:
    AL.append(a)
  else:
    AR.append(a)
    
print(min(len(AL),len(AR)))


### FIXED CODE ###

N, M, X = map(int,input().split())
AL, AR = [],[]
for a in map(int,input().split()):
  if a < X:
    AL.append(a)
  else:
    AR.append(a)
    
print(min(len(AL),len(AR)))
N, K= map(int, input().split())
h = list(map(int, input().split()))
import numpy as np
dp = np.full((N+1, K+1), np.inf, dtype=float)
dp[1] = np.zeros(K+1)
for i in range(1, N):
    k = 1
    while i >= k:
        dp[i+1][k] = abs(h[i] - h[i - k]) + min(dp[i + 1 - k][1:K + 1])
        k += 1
print(int(min(dp[N][1:K+1])))




### FIXED CODE ###

N, K= map(int, input().split())
h = list(map(int, input().split()))
dp = [0]*(N+1)
for i in range(1, N):
    dp[i+1] = min(
        [
            abs(h[i]-h[i-k]) + dp[i+1-k]
            for k in range(1, min(K, i)+1)
        ]
    )
print(dp[N])
X,Y=list(map(int,input().split()))

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
  
x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める
print((fac[x+y]*finv[x]%p)*finv[y]%p)




### FIXED CODE ###

X,Y=list(map(int,input().split()))

import sys
if (2*Y-X)%3!=0 or (2*X-Y)%3!=0:
  print(0)
  sys.exit()
if (2*Y-X)<0 or (2*X-Y)<0:
  print(0)
  sys.exit()
x=(2*Y-X)//3
y=(2*X-Y)//3
#(x+y)Cxを求める
fac=[0 for i in range(x+y+1)]
inv=[0 for i in range(x+y+1)]
finv=[0 for i in range(x+y+1)]
#初期条件
p=1000000007
fac[0]=fac[1]=1
inv[1]=1
finv[0]=finv[1]=1
#テーブルの作成
for i in range(2,x+y+1):
  fac[i]=fac[i-1]*i%p
  #p=(p//a)*a+(p%a) a^(-1)=-(p//a)*(p%a)^(-1)
  inv[i]=(-(p//i)*inv[p%i])%p
  finv[i]=finv[i-1]*inv[i]%p
#求める

print((fac[x+y]*finv[x]%p)*finv[y]%p)
i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(",")))
        i += 1; all += n; sum += price
    except
        break
    
print sum
print int(round(float(all)/i))

### FIXED CODE ###

i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(","))
        i += 1; all += n; sum += price*n
    except:
        break
    
print sum
print int(round(float(all)/i))
def solve():
  H, W, M = map(int, input().split())
  bomb = [[0]*W for _ in range(H)]
  lis1 = [0]*H
  lis2 = [0]*W
  for _ in range(M):
    h,w = map(int, input().split())
    h -= 1
    w -= 1
    bomb[h][w] = 1
    lis1[h] += 1
    lis2[w] += 1
  ans = 0
  for h in range(H):
    cnt = lis1[h]
    for w in range(W):
      ans = max(ans, cnt+lis2[w]-bomb[h][w])
  return ans
print(solve())

### FIXED CODE ###

from collections import defaultdict
def solve():
  H, W, M = map(int, input().split())
  bomb = defaultdict(lambda: 0)
  lis_h = [0]*H
  lis_w = [0]*W
  for _ in range(M):
    h,w = map(int, input().split())
    h -= 1
    w -= 1
    bomb[(h,w)] = 1
    lis_h[h] += 1
    lis_w[w] += 1
  m_h = max(lis_h)
  m_w = max(lis_w)
  m_h_lis = []
  m_w_lis = []
  for i in range(H):
    if lis_h[i]==m_h:
      m_h_lis.append(i)
  for i in range(W):
    if lis_w[i]==m_w:
      m_w_lis.append(i)
  ans = 0
  for h in m_h_lis:
    for w in m_w_lis:
      if bomb[(h,w)]==0:
        return m_h+m_w
  return m_h+m_w-1
print(solve())
def solve(n,k):
  counter = 0
  for i in range(n,k,-1):
    theValue = n//i * (i-k) + max(n%i-k , 0)
    counter += theValue
  return counter

c = list(map(int, input().split(' ')))
def(c[0], c[1])

### FIXED CODE ###

def solve(n,k):
  counter = 0
  for i in range(n,k,-1):
    theValue = n//i * (i-k) + max(n%i-k+1,0)
    if (k == 0):
      theValue = max(theValue-1, 0)
    counter += theValue
  return counter

c = list(map(int, input().split()))
print(solve(c[0], c[1]))
x = input()
c = ''
for e in range(x):
	c+='acl'
print(c)

### FIXED CODE ###

x = int(input())
print("ACL" * x)
N=int(input())
A_list=list(map(int,input().split()))
ans=1
for i in range(N):
    ans=ans*A_list[i]
    if ans>10**18:
        ans=-1
        break 
for i in A_list:
    if i==0:
        ans=0
print(ans)

### FIXED CODE ###

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