Harryxun/stf_run huggingface dataset:
#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

if (A % 2 == 0) or (B % 2 == 0) or (C % 2 == 0):
    print(0)
else:
    tmp = [A, B, C]
    tmp = sorted(tmp)
    print(tmp[0] * tmp[1])


### FIXED CODE ###

#! /usr/bin/env python3

import sys
import numpy as np
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

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

if (A % 2 == 0) or (B % 2 == 0) or (C % 2 == 0):
    print(0)
else:
    tmp = [A, B, C]
    tmp = sorted(tmp)
    print(tmp[0] * tmp[1])
from collections import defaultdict
from bisect import bisect_left
N, K = map(int, input().split())
a = [int(c)-1 for c in input().split()]
s = [0]
for i in range(N):
  s += [(s[-1]+a[i])%K]
dic = defaultdict(list)

for i in range(N+1):
  dic[s[i]] += [i]

ans = 0
for k in dic.keys():
  ls = dic[k]
  for j in range(len(ls)):
    ind = bisect_left(ls, ls[j]-K+2)
    ans += j-ind
    if ind!=0 and ls[ind-1]+1 == ls[ind]:
      ans += 1
#  print(k, ans)

print(ans)

### FIXED CODE ###

from collections import defaultdict
import itertools

N, K = map(int, input().split())
A = [int(c)-1 for c in input().split()]
A = [0] + A
Acum = list(itertools.accumulate(A))
Acum = [x%K for x in Acum]

counter = defaultdict(int)

ans = 0
for i,x in enumerate(Acum):
  ans += counter[x]
  counter[x] += 1
  if i>=K-1:
    counter[Acum[i-K+1]] -= 1
print(ans)
import math

n,k = map(int, input().split())
h = [int(input()) for i in range(n)] 
h.sort()

crr_min = 10^9
crr_min += 1

for i in range(0,math.ceil((n-k+1)/2)):
    tmp1 = h[n-k+i] - h[i]
    tmp2 = h[n-1-i] - h[n-k-i]
    if tmp1<crr_min:
        crr_min=tmp1

    if tmp2<crr_min:
        crr_min=tmp2

print(crr_min)

### FIXED CODE ###

import math

n,k = map(int, input().split())
h = [int(input()) for i in range(n)] 
h.sort()

crr_min = 10**9

for i in range(0,math.ceil((n-k+1)/2)):
    tmp1 = h[i+k-1] - h[i]
    tmp2 = h[-1-i] - h[-i-k]
    if tmp1==0 or tmp2==0:
        crr_min=0
        break

    if tmp1<crr_min:
        crr_min = tmp1

    if tmp2<crr_min:
        crr_min = tmp2


print(crr_min)
h, w = map(int, input().split())
s = []
for _ in range(w):
    s.append(input())
ans = ((i < h-1 and s[i+1][j] == '#') or (i > 0 and s[i-1][j] == '#') or (j > 0 and s[i][j-1] == '#') or (j < w-1 and s[i][j+1] == '#') for i in range(h) for j in range(w) if s[i][j] == '#')
if False in ans:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

h, w = map(int, input().split())
s = []
for _ in range(h):
    s.append(input())
ans = ((i < h-1 and s[i+1][j] == '#') or (i > 0 and s[i-1][j] == '#') or (j > 0 and s[i][j-1] == '#') or (j < w-1 and s[i][j+1] == '#') for i in range(h) for j in range(w) if s[i][j] == '#')
if False in ans:
    print("No")
else:
    print("Yes")
from math import gcd
n,*a=map(int,open(0).read().split())
p=gcd(a[0],a[1])
l=[a[0],p]
c=list(reversed(a))
q=gcd(c[0],c[1])
r=[q]
for i in range(1,n-1):
    p=gcd(p,a[i+1])
    l.append(p)
    q=gcd(q,c[i+1])
    r.append(q)

r=r[::-1]+[a[-1]]
r=r[1:]+[0]
l=[0]+l

print(max(gcd(s,t)for s,t in zip(r,l)))

### FIXED CODE ###

from fractions import*
n,*a=map(int,open(0).read().split())
p=gcd(a[0],a[1])
l=[a[0],p]
c=list(reversed(a))
q=gcd(c[0],c[1])
r=[q]
for i in range(1,n-1):
    p=gcd(p,a[i+1])
    l.append(p)
    q=gcd(q,c[i+1])
    r.append(q)

r=r[::-1]+[a[-1]]
r=r[1:]+[0]
l=[0]+l

print(max(gcd(s,t)for s,t in zip(r,l)))
l = map( int, raw_input().split() )

if l[0] < l[1]:
   print 'a < b'
else if l[0] > l[1]:
   print 'a < b'
else:
   print 'a == b'

### FIXED CODE ###

l = map( int, raw_input().split() )

if l[0] < l[1]:
    print 'a < b'
elif l[0] > l[1]:
    print 'a > b'
else:
    print 'a == b'
a=int(input())
b=int(input())
k=int(input())

c=b-a+1

aa=[]
bb=[]

for i in range(k):
    aa.append(a+i)
    bb.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(aa[i])
    for i in range(k):
        print(bb[k-i-1])

else:
    for i in range(a,b+1):
        print(i)


### FIXED CODE ###

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

c=b-a+1

a1=[]
b1=[]

for i in range(k):
    a1.append(a+i)
    b1.append(b-i)

if c>2*k-1:
    for i in range(k):
        print(a1[i])
    for i in range(k):
        print(b1[k-i-1])

else:
    for i in range(a,b+1):
        print(i)
a,b,c,d = map(int,input().split())

if abs(a,c) <= d:
  print("Yes")
elif abs(a,b) <= d and abs(b,c) <= d:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

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

if abs(a-c) <= d:
  print("Yes")
elif abs(a-b) <= d and abs(b-c) <= d:
  print("Yes")
else:
  print("No")
a=input()
b=input()
import syss
for i in range(len(a)):
    if a[i]==b[i]:
        pass
    else:
        print("No")
        sys.exit()
print('Yes')


### FIXED CODE ###

s=input()
t=input()
import sys
for i in range(len(s)):
    if s[i]==t[i]:
        pass
    else:
        print("No")
        sys.exit()
print('Yes')
s = input()

for i in range(3):
  if s[i] == "1":
    s[i] = "9"
  else:
    s[i] = "1"

### FIXED CODE ###

s = list(input())
 
for i in range(3):
  if s[i] == "1":
    s[i] = "9"
  else:
    s[i] = "1"

print("".join(s))
N = int(input())
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
mi = 0
mA = 1e16
for i in range(5):
    if (A[i] < mA):
        mA = A[i]
        mi = i
print((N // A[mi]) + (5 - mi) + mi)


### FIXED CODE ###

import math
N = int(input())
A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
print(math.ceil(N / min(A)) + 4)
N, A, B = input().split()
A = int(A)
B = int(B)
k_sum = 0
ans = 0
for j in range(1, int(N)+1):
  j = str(j)
  for i in range(len(j)):
  	k_sum += int(j[i])
  if k_sum >= A and k_sum <= B:
    ans += int[j]

print(j)
  

### FIXED CODE ###

N, A, B = input().split()
A = int(A)
B = int(B)
k_sum = 0
ans = 0
for j in range(1, int(N)+1):
  j = str(j)
  k_sum = 0
  for i in range(len(j)):
  	k_sum += int(j[i])
  if k_sum >= A and k_sum <= B:
    ans += int(j)
print(ans)
n=input()
print("Four" if len(set(map(int,input().split())))==4 else "Three")

### FIXED CODE ###

n=input()
print("Four" if len(set(map(str,input().split())))==4 else "Three")
N,M = map(int, input().split())
As = list(map(int, input().split()))
As.sort()
BCs = [0 for i in range(M)]
for i in range(M):
    BCs[i] = list(map(int, input().split()))
BCs.sort(key=lambda x: x[1])
for i in reversed(range(M)):
    B = BCs[i][0]
    C = BCs[i][1]
    j = 0
    while As[j] < C and B > 0:
        As[j] = C
        j += 1
        B -= 1
    As.sort()

ans = 0
for i in range(N):
    ans += As[i]

print(ans)




### FIXED CODE ###

N,M = map(int, input().split())
As = list(map(int, input().split()))
As.sort()
BCs = [0 for i in range(M)]
for i in range(M):
    BCs[i] = list(map(int, input().split()))
BCs.sort(key=lambda x: x[1])
mark = 0
ans = 0
for i in reversed(range(M)):
    B = BCs[i][0]
    C = BCs[i][1]
    j = mark
    if As[j] >= C:
        break
    while As[j] < C and B > 0:
        As[j] = C
        j += 1
        if j >= N:
            break
        B -= 1
    
    ans += (j - mark)*C
    mark = j
    if j >= N:
        break
    
for i in range(mark,N):
    ans += As[i]

print(ans)
from collections import Counter
n,m=map(int,input().split())
l=[]
for i in range(m):
  s=[]
  a,b=map(int,input().split())
  s.append(a)
  s.append(b)
  l.append(s)
def get_unique_list(seq):
    seen = []
    return [x for x in seq if (x or reversed(x)) not in seen and not seen.append(x)]
ls=get_unique_list(l)
cnt=Counter([x[0] for x in ls])
print(max(cnt.values)+1)

### FIXED CODE ###

n,m=map(int,input().split())
root=[-1]*n
def r(x):
  if root[x]<0:
    return x
  else:
    root[x]=r(root[x])
    return root[x]
def unite(x,y):
  x=r(x)
  y=r(y)
  if x==y:
    return
  root[x]+=root[y]
  root[y]=x
for i in range(m):
  a,b=map(int,input().split())
  a-=1
  b-=1
  unite(a,b)
ans=0
for i in range(n):
  ans=max(ans,-root[i])
print(ans)
import math


# Me
class Check():
    def __init__(self):
        self.now_t, self.now_x, self.now_y = 0, 0, 0

    def do(self, t, x, y):
        distance = math.sqrt((x - self.now_x) * (y - self.now_y))
        duration = t - self.now_t
        if duration < distance:
            return False

        if (t - self.now_t) % 2 != (x + y - (self.now_x + self.now_y)) % 2:
            return False
        self.now_t, self.now_x, self.now_y = t, x, y
        return True


N = int(input())
c = Check()
for i in range(N):
    a = [int(x) for x in input().split()]
    if not c.do(a[0], a[1], a[2]):
        print('No')
        exit()
print('Yes')

### FIXED CODE ###

# Me
class Check():
    def __init__(self):
        self.now_t, self.now_x, self.now_y = 0, 0, 0

    def do(self, t, x, y):
        distance = ((x - self.now_x) + (y - self.now_y))
        duration = t - self.now_t
        if duration < distance:
            return False

        if distance % 2 != duration % 2:
            return False

        self.now_t, self.now_x, self.now_y = t, x, y
        return True


N = int(input())
c = Check()
for i in range(N):
    a = [int(x) for x in input().split()]
    if not c.do(a[0], a[1], a[2]):
        print('No')
        exit()
print('Yes')
if (input() == '3') or (input() == '5') or (input() == '7'):
  print("YES")
else:
  print("NO")n = input()
if (n == '3') or (n == '5') or (n == '7'):
    print("YES")
else:
    print("NO")


### FIXED CODE ###

n = input()
if (n == '3') or (n == '5') or (n == '7'):
    print("YES")
else:
    print("NO")
def f(x):
    if x == "r":
        return "p"
    elif x == "s":
        return "r"
    else:
        return "s"

def g(x):
    if x == "r":
        return r
    elif x == "s":
        return s
    else:
        return p 
n,k = map(int,input().split())

r,s,p = map(int,input().split())

t = str(input())
ssssppr
m = n
a = 0
ss = [' '] ** m

if m <= k:
    for i in range(m):
        a += g(f(t[i]))
    print(a)
else:
    for i in range(k):
        a += g(f(t[i]))
        ss[i] = f(t[i])
    for i in range(k,m):
        if t[i-k] != t[i]:
            a += g(f(t[i]))
            ss[i] = f(t[i])
        elif (t[i-k] == t[i]) and (ss[i-k] != f(t[i])):
            a += g(f(t[i]))
            ss[i] = f(t[i])
    print(a)
    

### FIXED CODE ###

def f(x):
    if x == "r":
        return "p"
    elif x == "s":
        return "r"
    else:
        return "s"

def g(x):
    if x == "r":
        return r
    elif x == "s":
        return s
    else:
        return p 

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

r,s,p = map(int,input().split())

t = str(input())

m = n
a = 0
ss = [' '] * m

if m <= k:
    for i in range(m):
        a += g(f(t[i]))
    print(a)
else:
    for i in range(k):
        a += g(f(t[i]))
        ss[i] = f(t[i])
    for i in range(k,m):
        if t[i-k] != t[i]:
            a += g(f(t[i]))
            ss[i] = f(t[i])
        elif (t[i-k] == t[i]) and (ss[i-k] != f(t[i])):
            a += g(f(t[i]))
            ss[i] = f(t[i])
    print(a)
a,b=map(int,input().split())

c=[]
for i in range(1,100):
	c.append(i*100**a)
print(c[b-1])


### FIXED CODE ###

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

c=[]
for i in range(1,102):
	c.append(i*100**a)
if b!=100:
	print(c[b-1])
else:
	print(c[b])
divisor = 10 ** 9 + 7
h, w, n = map(int, input().split())
a = [['.'] * w for _ in range(h)]
for _ in range(n):
  r, c = map(int, input().split())
  a[r - 1][c - 1] = '#'
for i in range(h):
  a[i] = ''.join(a[i])
dp = [[0] * w for _ in range(h)]
dp[0][0] = 1
dp0 = dp[0]
a0 = a[0]
for j in range(1, w):
  if a0[j] != '#':
    dp0[j] = dp0[j - 1]
for i in range(1, h):
  dpi = dp[i]
  dpi1 = dp[i - 1]
  ai = a[i]
  if ai[0] != '#':
    dpi[0] = dpi1[0]
  for j in range(1, w):
    if ai[j] != '#':
      dpi[j] = (dpi1[j] + dpi[j - 1]) % divisor
print(dp[h - 1][w - 1])


### FIXED CODE ###

divisor = 10 ** 9 + 7
h, w = map(int, input().split())
a = [input() for _ in range(h)]
dp = [[0] * w for _ in range(h)]
dp[0][0] = 1
dp0 = dp[0]
a0 = a[0]
for j in range(1, w):
  if a0[j] != '#':
    dp0[j] = dp0[j - 1]
for i in range(1, h):
  dpi = dp[i]
  dpi1 = dp[i - 1]
  ai = a[i]
  if ai[0] != '#':
    dpi[0] = dpi1[0]
  for j in range(1, w):
    if ai[j] != '#':
      dpi[j] = (dpi1[j] + dpi[j - 1]) % divisor
print(dp[h - 1][w - 1])
n,m,d=map(float,input().split())
print((m-1.0)*(n-d)*((d)?2.0:1.0)/(n*n));

### FIXED CODE ###

n,m,d=map(float,input().split())
print((m-1)*(n-d)*([1,2][d>0])/n**2);
s = input()
c = s.count()
print(s[1:1] + str(c) + s[-1:1])
  

### FIXED CODE ###

s = input()
c = len(s) - 2
print(s[0:1] + str(c) + s[-1:])
n = input()
n = int(n[1:])
if 1000 - n == 1000:
    print(0)
else:
    print(1000 - n)


### FIXED CODE ###

n = int(input())
n = n % 1000
if 1000 - n == 1000:
    print(0)
else:
    print(1000 - n)
from collections import Collecter; print('YNeos'[Counter(sorted(list(input()))).values() != [2,2]::2])

### FIXED CODE ###

from collections import Counter; print("YNeos"[list(Counter(list(input())).values()) != [2,2]::2])
n = int(input())
pl = list()
for i in range(n):
    pl.append(list(map(int, input().split())))

import math
lsum = 0
for i in range(n):
    for j in range(n):
        if i != j:
            a, b = pl[i]
            c, d = pl[j]
            lsum += math.sqrt((a-c) ** 2 + (b-d) ** 2)
print(lsum /(2 * n)

### FIXED CODE ###

n = int(input())
pl = list()
for i in range(n):
    pl.append(list(map(int, input().split())))

import math
lsum = 0
for i in range(n):
    for j in range(n):
        if i != j:
            a, b = pl[i]
            c, d = pl[j]
            lsum += math.sqrt((a-c) ** 2 + (b-d) ** 2)
print(lsum /(n))
def main():
    n = int(input())
    a = list(map(int, input().split()))
    a.sort()
    ans = 0
    if a[0] != a[1]:
        ans += 1

    for i in range(1, n):
        flg = True
        if i != n - 1:
            if a[i] == a[i - 1] or a[i] == a[i + 1]:
                continue
        else:
            if a[i] == a[i - 1]:
                continue

        for j in range(i):
            if a[i] % a[j] == 0:
                flg = False
                break
            if a[j] * 2 > a[i]:
                break
        if flg:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import Counter
n = int(input())
a = list(map(int, input().split()))

c = Counter(a)
b = [k for k, v in c.items() if v == 1]
b.sort()
d = {b: i for i, b in enumerate(b)}

gg = [True] * len(b)
mx = 10 ** 6 + 1
for i in c.keys():
    for j in range(2 * i, mx, i):
        if j in d:
            gg[d[j]] = False

print(sum(gg))
h,w=map(int,input().split())
#枠を大きめに確保してout of rangeを避ける!
grid = ["."*(w+2)]
for _ in range(h):
    grid.append("." + input() + ".")
grid += ["."*(w+2)]

for i in range(1,h+1):
    for j in range(1,w+1):
        if grid[i][j]=="#":
            if not (grid[i][j-i]=="#" or grid[i][j+1]=="#"or \
                grid[i-1][j]=="#" or grid[i+1][j]=="#"):
                    print("No")
                    exit()
print("Yes")

### FIXED CODE ###

h,w=map(int,input().split())
s=list(input() for _ in range(h))
flag=1
for i in range(h):
    for j in range(w):
        check=0
        if s[i][j]=="#":
            if i!=0 and s[i-1][j]=="#":check +=1
            if i!=h-1 and s[i+1][j]=="#":check += 1
            if j!=0 and s[i][j-1]=="#":check += 1
            if j!=w-1 and s[i][j+1]=="#":check += 1
            if check==0:flag=0
print("Yes" if flag else "No")
=input()
T=S.replace('?', 'D')
print(T)

### FIXED CODE ###

S=input()
T=S.replace('?', 'D')
print(T)
a,t=input().split()
a=int(a)
t=int(t)
x=a*t
i=int(input(i))
c=min(x,i)

### FIXED CODE ###

a,t,i=input().split()
a=int(a)
t=int(t)
x=a*t
i=int(i)
c=min(x,i)
print(c)
from functools import reduce
from math import gcd
n=int(input())
t=[int(input()) for i in range(n)]
x=reduce(gcd,t)
lcm=t[0]*t[1]//x
for i in range(2,n):
  lcm=lcm*t[i]//gcd(lcm,t[i])
print(lcm)

### FIXED CODE ###

from fractions import gcd
def lcm(a,b): return a*b//gcd(a,b)
N=int(input())
ans=1
for i in range(N):
    t=int(input())
    ans=lcm(ans,t)
print(ans)
from bisect import*
r=lambda:sorted(map(int,input().split()))
N=r()[0]
A,B,C,w,s=r(),r(),r(),[0]*N,0
for i in range(N-1,-1,-1):s=w[i]=s+N-bisect(C,B[i])
print(sum(w[bisect(B,A[i])]for i in range(N)))

### FIXED CODE ###

import bisect
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort()
B.sort()
C.sort()

bc = [None]*(N+1)
bc[N] = 0
for i in range(N-1, -1, -1):
    bc[i] = bc[i+1] + N - bisect.bisect_right(C, B[i])
ans = 0
for i in range(N):
    ans += bc[bisect.bisect_right(B, A[i])]
print(ans)
x = map(int, input().split(' '))
for i in range(0, len(x)):
  if x[i] == 0:
    print(i+1)
    break

### FIXED CODE ###

x = [x for x in map(int, input().split(' '))]
for i in range(0, len(x)):
  if x[i] == 0:
    print(i+1)
    break
N,M = map(int,input().split())
List = list(map(int,input().split()))

a = [0,2,5,5,4,5,6,3,7,6]

kazu = [a[List[i]] for i in range(M)]

def dddd(kazu,X):
  dp = [ [ 0 for j in range(X+1)]  for i in range(M)]

  for i in range(M):
    for j in range(X):
      if kazu[i] <= j:
        dp[i][j+1] = max(dp[i][j+1-kazu[i]] + 1,dp[i-1][j+1])
      else:
        dp[i][j+1] = dp[i-1][j+1]
  return dp[-1]
   
keta_arr = dddd(kazu,N)
keta = keta_arr[-1]
List.sort(reverse=True)
ans = []
x = 0

while keta>0:
  for aa in List:
    k = a[aa]
    if N-k >= 0:
      if keta_arr[-k-1-x] == keta-1:
        ans.append(aa)
        x += k
        N = N-k
        keta -= 1
    else:
      continue
ans.sort(reverse=True)
print(int(''.join(map(str,ans))))

### FIXED CODE ###

N,M = map(int,input().split())
List = list(map(int,input().split()))

a = [0,2,5,5,4,5,6,3,7,6]

kazu = [a[List[i]] for i in range(M)]

def dddd(kazu,X):
  dp = [ [ -float('inf') for j in range(X+1)]  for i in range(M)]
  for i in range(M):
    dp[i][0] = 0

  for i in range(M):
    for j in range(X+1):
      if kazu[i] <= j:
        dp[i][j] = max(dp[i][j-kazu[i]] + 1,dp[i-1][j])
      else:
        dp[i][j] = dp[i-1][j]
  return dp[-1]
   
keta_arr = dddd(kazu,N)
keta = keta_arr[-1]
List.sort(reverse=True)
ans = []

while keta>0:
  for aa in List:
    k = a[aa]
    if N-k < 0:
      continue
    if N-k >= 0:
      if keta_arr[N-k] == keta-1:       
        ans.append(aa)
        N = N-k
        keta -= 1
        break
ans.sort(reverse=True)
print(int(''.join(map(str,ans))))
><

### FIXED CODE ###

from decimal import Decimal
A, B = map(Decimal, input().split())
print(int(A * B))
nx = list(map(int, list(input().split())))
n = nx[0]
x = nx[1]

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

goukei = 0
for i in range(n + 1):
    if goukei > x:
        break
    goukei = goukei + l[i]

print(i)

### FIXED CODE ###

nx = list(map(int, list(input().split())))
n = nx[0]
x = nx[1]

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

goukei = 0
for i in range(n + 1):
    if goukei > x:
        print(i)
        break
    if i == n:
        print(n + 1)
        break
    goukei = goukei + l[i]
def main():
    a, b, c, d = map(int, input())
    if a*b >= c*d:
        print(a*b)
    else:
        print(c*d)


if __name__ == "__main__":
    main()


### FIXED CODE ###


def main():
    a, b, c, d = map(int, input().split())
    if a*b >= c*d:
        print(a*b)
    else:
        print(c*d)


if __name__ == "__main__":
    main()
N = int(input())
H = list(map(int, input().split()))
count = []
c = 0
H.reverse()

for i in range(1, len(H)):
    if H[i] >= H[i - 1]:
         c += 1
         continue
    count.append(c)
    c = 0


print(max(count))

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
ans = 0
c = 0
H.reverse()

for i in range(1, len(H)):
    if H[i] >= H[i - 1]:
        c += 1
    else:
        c = 0
    ans = max(c, ans)

print(ans)
a,b
s = a*b
if s%2==0:
  print("Even")
else :
  print("Odd")
  

### FIXED CODE ###

a,b = map(int,input().split())
s = a*b
if s%2==0:
  print("Even")
else :
  print("Odd")
A,B=map(int,input().strip())

if A>B:
    print(A+A-1)
elif A<B:
    print(B+B-1)
else:
    print(A+B)

### FIXED CODE ###

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

if A>B:
    print(A+A-1)
elif A<B:
    print(B+B-1)
else:
    print(A+B)
from heapq import*
def g(s,g):
 F=[1e7]*-~n;F[s]=0
 H=[(0,s)]
 while H:
  c,u=heappop(H)
  if u==g:return c
  for f,v in E[u]:
   t=c+f
   if t<F[v]:F[v]=t;heappush(H,(t,v))
 return-1
def s():
 for e in iter(input,'0 0'):
  n,k=map(int,e.split())
  E=[[]for _ in[0]*-~n]
  for _ in[0]*k:
   f=[*map(int,input().split())]
   if f[0]:
    c,d,e=f[1:]
    E[c]+=[(e,d)];E[d]+=[(e,c)]
   else:print(g(*f[1:]))
if'__main__'==__name__:s()


### FIXED CODE ###

def s():
 import sys
 r=sys.stdin.readline
 I=float('inf')
 for e in iter(r,'0 0\n'):
  n,k=map(int,e.split())
  F=[[I]*-~n for _ in[0]*-~n]
  for i in range(1,n+1):F[i][i]=0
  for _ in[0]*k:
   f=r();g=map(int,f[2:].split())
   if'0'==f[0]:a,b=g;A=F[a][b];print([A,-1][A==I])
   else:
    c,d,e=g
    if e<F[c][d]:
     for i in range(2,n+1):
      for j in range(1,i):
       F[i][j]=F[j][i]=min(F[i][j],F[i][c]+e+F[d][j],F[i][d]+e+F[c][j])
s()
import math


X, Y = (int(i) for i in input().split())

i = (2*X-Y)//3
j = (2*Y-X)//3

if(  ((2*X-Y)%3)!=0 or (2*Y-X)%3!=0  ):
    print(0)
else:
    print( (math.factorial(i+j)/math.factorial(i)/math.factorial(j) ) % 1000000007 )

### FIXED CODE ###

import math

# 有理数型をインポート

# 組合せの総数
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
 
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
 
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot
 
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
 
    return result


X, Y = (int(i) for i in input().split())

i = (2*X-Y)//3
j = (2*Y-X)//3

if(  i < 0 or j < 0 or (2*X-Y)%3!=0 or (2*Y-X)%3!=0 ):
    print(0)
else:
    print(cmb(i+j, i) % 1000000007)
A =int( input())
B = int(input())
C = int(input())
 
count5 = 0
count7 = 0
 
if A == 5:
    count5 = count5 + 1
elif A == 7:
    count7 = count7 + 1
if B == 5:
    count5 = count5 + 1
elif B == 7:
    count7 = count7 + 1
if C == 5:
    count5 = count5 + 1
elif C == 7:
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s = input().split()

count5 = 0
count7 = 0
 
if s[0] == "5":
    count5 = count5 + 1
if s[0] == "7":
    count7 = count7 + 1
if s[1] == "5":
    count5 = count5 + 1
if s[1] == "7":
    count7 = count7 + 1
if s[2] == "5":
    count5 = count5 + 1
if s[2] == "7":
    count7 = count7 + 1
    
if count5 == 2 and count7 == 1:
    print("YES")
else:
    print("NO")
a,b=map(int,input().split())
s=input()
if '-' not in s or s.count('-')>1 or s[0]=='-' or s[-1]=='-':
    print('No')
    exit()

p=s.split('-')
print('No' if s[a]!='-' or len(p[0]!=a or len(p[1])!=b) else 'Yes')

### FIXED CODE ###

a,b=map(int,input().split())
s=input()
if '-' not in s or s.count('-')>1 or s[0]=='-' or s[-1]=='-':
    print('No')
    exit()

p=s.split('-')
print('No' if s[a]!='-' or len(p[0])!=a or len(p[1])!=b else 'Yes')