Harryxun/stf_run huggingface dataset:
while True:
 x,y =map(int,raw_input.split())
 if(x==y==0):
   break
 elif(x>y):
  print"%d > %d"%(x,y)
 elif(x<y):
  print"%d < %d"%(x,y)
 else:
  print"%d = %d"%(x,y)

### FIXED CODE ###

while True:
 x,y =map(int, raw_input().split())
 if(x==0 and y==0):
   break
 elif(x>y):
  print y,x  
 elif(x<=y):
  print x,y
N= int(input())
count=0
for i in range(N):
	p,q=map(int,input().split(' '))
    if p==q:
		count+=1
	else:
      	count=0

if count>=3:
  print('Yes')
else:
  print('No')
		

### FIXED CODE ###

N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if count<3:
    if p==q:
      count+=1
    else:
      count=0
  else:
    pass

if count>=3:
  print('Yes')
else:
  print('No')
input_line = input()

tarList = input_line.split()
result = tarList[0]*tarList[1]
 
if result % 2 == 0:
  print('Even')
else:
  print('Odd')

### FIXED CODE ###

x, y = map(int,input().split())

result = x*y
 
if result % 2 == 0:
  print('Even')
else:
  print('Odd')
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

lim = 2*10**6
fact = [1]*(lim+1)
for n in range(1, lim+1):
	fact[n] = n*fact[n-1]%mod

fact_inv = [1]*(lim+1)
fact_inv[lim] = pow(fact[lim], mod-2, mod)
for n in range(lim, 0, -1):
	fact_inv[n-1] = n*fact_inv[n]%mod

def C(n, r):
	return (fact[n]*fact_inv[r]%mod)*fact_inv[n-r]%mod

H, W, A, B = MAP()

ans = 0
for n in range(B, W):
	way = C(H-A-1+n, n)*C(W-n-1+A-1, A-1)%mod
	ans = (ans+way)%mod

print(ans)


### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

lim = 2*10**6
fact = [1]*(lim+1)
for n in range(1, lim+1):
	fact[n] = n*fact[n-1]%mod

fact_inv = [1]*(lim+1)
fact_inv[lim] = pow(fact[lim], mod-2, mod)
for n in range(lim, 0, -1):
	fact_inv[n-1] = n*fact_inv[n]%mod

def C(n, r):
	return (fact[n]*fact_inv[r]%mod)*fact_inv[n-r]%mod

H, W, A, B = MAP()

ans = 0
for n in range(B, W):
	way = C(H-A-1+n, n)*C(W-n-1+A-1, A-1)%mod
	ans = (ans+way)%mod

print(ans)
N=int(input())
A=[input() i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.popleft()
print(len(B))

### FIXED CODE ###

N=int(input())
A=[int(input()) for i in range(N)]
B=[]
while len(A)!=0:
  if A[0] not in B:
    B.append(A[0])
  A.pop(0)
print(len(B))
s=input()
a,b,n=0,0,len(s)
for i in range(n):
    if s[i]==T:
        if a==0:
            b+=1
        else:
            a-=1
    else:
        a+=1
print(n-2*a)

### FIXED CODE ###

s=input()
a,b,n=0,0,len(s)
for i in range(n):
    if s[i]=='T':
        if a==0:
            b+=1
        else:
            a-=1
            b-=1
    else:
        a+=1
        b+=1
print(b)
import sys


def main():
    a = int(sys.argv[1])
    b = int(sys.argv[2])
    c = int(sys.argv[3])
    bells = [a, b, c]
    bells.sort()
    print(bells[0] + bells[1])


if __name__ == '__main__':
    main()

### FIXED CODE ###


def main():
    arg = input()
    arg = arg.split()
    a = int(arg[0])
    b = int(arg[1])
    c = int(arg[2])
    bells = [a, b, c]
    bells.sort()
    print(bells[0] + bells[1])


if __name__ == '__main__':
    main()
N = int(input())
S = input()
temp_count = S.count("W")
ans_min = 10**10
count_E = N-temp_count
count_W = 0 
for i in range(N):
    if S[i] == "W":
        count_E -= 1
    else:
        count_W +=1
    if ans_min > coun_E+count_W:
        ans_min =  coun_E+count_W
print(ans_min)

### FIXED CODE ###

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

count_E = S[1:].count("E")
ans = count_E
for i in range(1,N):
    if S[i-1] == "W":
        count_E += 1
    if S[i] == "E":
        count_E -= 1
    if ans >count_E:
        ans = count_E
print(ans)
N,M = map(int,input().split())
A = sorted(list(map(int,input().split())))
BC = [list(map(int,input().split())) for _ in range(M)]
BC = sorted(BC, key=lambda x:x[1], reverse=True)
D = [0] * N
idx = 0
for b,c in BC:
    for i in range(b):
        D[idx] = c
        idx += 1
        if i >= N:
            break
    if i >= N:
        break
# print(D)


# print(D)
# print(sorted(A))
# print(len(D), len(A))
for i in range(N):
    if A[i] < D[i]:
        A[i] = D[i]
    else:
        break
print(sum(A))

### FIXED CODE ###

N,M = map(int,input().split())
A = sorted(list(map(int,input().split())))
BC = [list(map(int,input().split())) for _ in range(M)]
BC = sorted(BC, key=lambda x:x[1], reverse=True)
D = [0] * N
idx = 0
for b,c in BC:
    for i in range(b):
        D[idx] = c
        idx += 1
        if idx >= N:
            break
    if idx >= N:
        break
# print(D)


# print(D)
# print(sorted(A))
# print(len(D), len(A))
for i in range(N):
    if A[i] < D[i]:
        A[i] = D[i]
    else:
        break
print(sum(A))
a = int(input())
kazu = [int(input()) for _ in range(1)]
if a == 1:
  print("Hello World")
else:
  print(sum(kazu))


### FIXED CODE ###

a = int(input())
if a == 1:
  print("Hello World")
else:
  b = int(input())
  c = int(input())
  print(b + c)
def ncr(x,y):
	ans=1
	q=x-y
	while x>y:
		ans*=x
		x=x-1
	
	while q>1:
		ans=ans/q
		q=q-1
	
	return ans

x=input().split()
n=int(x[0])
a=int(x[1])
b=int(x[2])
v=[0]*n
x = input().split()
ind=0
M={1:0}
M2={1:0}
for i in x:
	v[ind]=int(i)
	if int(i) in M:
		M[v[ind]]+=1
	else:
		M[v[ind]]=1
	ind+=1
v.sort(reverse=True)

cnt=0
ind=0
m=0
while cnt<a:
	cnt+=1
	m=((cnt-1)*m+v[ind])/cnt
	if v[ind] in M2:
		M2[v[ind]]+=1
	else:
		M2[v[ind]]=1
	ind+=1
while cnt<b:
	if (cnt*m+v[ind])/(cnt+1)<m-0.5:
		break
	else:
		cnt+=1;
		if v[ind] in M2:
			M2[v[ind]]+=1
		else:
			M2[v[ind]]=1
		ind+=1
print(m)
maxw=cnt;
ways=0;
for i in range(cnt,a-1,-1):
	if v[ind-1] not in M2:
			M2[v[ind]]=0
	if v[ind-1] not in M:
			M[v[ind-1]]=0
	ways+=ncr(M[v[ind-1]],M2[v[ind-1]])
	
	M2[v[ind-1]]-=1

print(int(ways))
	

### FIXED CODE ###

x=input().split()
ans=int(x[0])+int(x[1])
print(int(ans%24))
#coding utf-8
a,b = map(int,input().split())
if(a == b):
	print('a == b')
elif(a < b):
	print('a < b')
else:
	print(


### FIXED CODE ###

a,b = map(int,input().split())
if(a == b):
	print("a == b")
elif(a < b):
	print("a < b")
else:
	print("a > b")
N = int( input())
ans = len( str(N))
for i in range(1,int( N**(1/2))+1):
    if N%i == 0:
        ans = min( ans, max( len(i), len(N//i)))
        break
print(ans)

### FIXED CODE ###

N = int( input())
ans = len( str(N))
for i in range(1,int( N**(1/2))+1):
    if N%i == 0:
        ans = min( ans, max( len( str(i)), len( str(N//i))))
print(ans)
# -*- coding: utf-8 -*-

#問題文
#すぬけ君は 1,2,3 の番号がついた 3 つのマスからなるマス目を持っています。 各マスには 0 か 1 が書かれており、マス i
# には si が書かれています。
#すぬけ君は 1 が書かれたマスにビー玉を置きます。 ビー玉が置かれるマスがいくつあるか求めてください。

#制約
#s1,s2,s3 は 1 あるいは 0

s = str(raw_input())
count += 1 for count in s > 0 if s%10 == 1

print count


### FIXED CODE ###

# -*- coding: utf-8 -*-

#問題文
#すぬけ君は 1,2,3 の番号がついた 3 つのマスからなるマス目を持っています。 各マスには 0 か 1 が書かれており、マス i
# には si が書かれています。
#すぬけ君は 1 が書かれたマスにビー玉を置きます。 ビー玉が置かれるマスがいくつあるか求めてください。

#制約
#s1,s2,s3 は 1 あるいは 0

countup = 0
s = str(raw_input())
for count in s :
    if count == '1':
        countup += 1
    else:
        countup = countup

print countup
import sys
def input():
    return sys.stdin.readline()[:-1]
N , Q = map(int,input().split())
graph = [[] for _ in range(N)]
point = [0] * N
for _ in range(N - 1):
    a , b = map(int,input().split())
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
#print(graph)
for _ in range(Q):
    a , b = map(int,input().split())
    a = a - 1
    point[a] += b
# dfsを用いて累積和を計算する
# 初期状態だと前の値がないためデフォルト引数に-1を代入
def dfs(now , prev = -1):
    for next in graph[now]:
        # 次のノードが前に参照した値の時はcontinue
        if next == prev:
            continue
        # 現在の値を次のポイントに加算することで累積和をとる
        point[next] += point[now]
        # 次のノードと現在のノードを引数にdfsを継続する
        dfs(next , now)

dfs(0)
print(*point)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 6)
import sys
def input():
    return sys.stdin.readline()[:-1]
N , Q = map(int,input().split())
graph = [[] for _ in range(N)]
point = [0] * N
for _ in range(N - 1):
    a , b = map(int,input().split())
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
#print(graph)
for _ in range(Q):
    a , b = map(int,input().split())
    a = a - 1
    point[a] += b
# dfsを用いて累積和を計算する
# 初期状態だと前の値がないためデフォルト引数に-1を代入
def dfs(now , prev = -1):
    for next in graph[now]:
        # 次のノードが前に参照した値の時はcontinue
        if next == prev:
            continue
        # 現在の値を次のポイントに加算することで累積和をとる
        point[next] += point[now]
        # 次のノードと現在のノードを引数にdfsを継続する
        dfs(next , now)

dfs(0)
print(*point)
N = int(input())
sub = 0
count = 1
A = [int(i) for i in input().split()]
pre_num = A[1]
pre_sub = A[1] - A[0]
for num in A[2:]:
    if not pre_num == num:
        if pre_sub * (num - pre_num) < 0:
            count += 1
            pre_sub = 0
        else:
          	pre_sub = num - pre_num
        pre_num = num
print(count)

### FIXED CODE ###

N = int(input())
selector = 0
count = 1
A = [int(i) for i in input().split()]
pre_num = A[0]
for num in A[1:]:
    if selector == 0:
        selector = num - pre_num
    if selector > 0:
        if num < pre_num:
            selector = 0
            count += 1
    if selector < 0:
        if num > pre_num:
            selector = 0
            count += 1
    pre_num = num
print(count)
a = list(input())
if a[0] == a[-1]:
    if len(a) % 2 == 1:
        print('Second')
    else:
        print('First')
else:
    if len(s) % 2 == 1: 
        print('First')
    else:
        print('Second')

### FIXED CODE ###

s=input()
if(s[0]==s[len(s)-1]):
    if(len(s) & 1):
        print('Second')
    else:
        print('First')
else:
    if(len(s) & 1):
        print('First')
    else:
        print('Second')
N=int(input())
S=input()
if all(a==b for a,v in zip(S,S[N:]):
       print("Yes")
else:
       print("No")

### FIXED CODE ###

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

if N%2==0 and all(a==b for a,b in zip(S,S[N//2:])):
    print("Yes")
else:
    print("No")
def is_prime(num):
  for i in range(num):
    if num % i == 0:
      return False
  return True

x = int(input())

for i in range(x, 10000+4):
  if is_prime(i):
    print(i)
    break

### FIXED CODE ###

def is_prime(num):
  for i in range(2, num):
    if num % i == 0:
      return False
 
  return True

x = int(input())

for i in range(x, 100004):
  if is_prime(i):
    print(i)
    break
Wethers={"Sunny":0,"Cloudy":1,"Rainy":2}
Wether=["Sunny","Cloudy","Rainy"]
S=input()[:-1]
S_id = Wethers[S]
print(Wether(S_id+1)%3)



### FIXED CODE ###

Wethers={"Sunny":0,"Cloudy":1,"Rainy":2}
Wether=["Sunny","Cloudy","Rainy"]
S=input()
S_id = Wethers[S]
print(Wether[(S_id+1)%3])
N,A=map(int,input().split())
B=sorted(list(int(input()) for i n range(N)))
for j in range(A):
    B.pop()
print(sum(B))

### FIXED CODE ###

N,A=map(int,input().split())
B=sorted(list(map(int,input().split())))
for j in range(A):
    if B!=[]: B.pop()
print(sum(B))
import math

ans = 1000000000000000000
N = int(input())
for i in range(math.sqrt(N+1000)):
  if i > 0 and N % i == 0:
    ans = min(i + N/i - 2, ans)
print(ans)

### FIXED CODE ###

import math

ans = 1000000000000000000
N = int(input())
for i in range(math.ceil(math.sqrt(N+1000))):
  if i > 0 and N % i == 0:
    ans = min(i + N/i - 2, ans)
print(int(ans))
import numpy as np
import sys

L, N = map(int, input().split())
X = np.array([int(sys.stdin.readline()) for _ in range(N)])
X2 = X[::-1]
Y1 = np.concatenate(([X[0]], X[1:] - X[:-1], [L - X[-1]]))
Y2 = Y1[::-1]


def func(n):
    return np.concatenate((np.full(n + 1, N - n, dtype=np.int), np.arange(N - n - 2, -1, -2), np.arange(N - n - 1, -1, -2)[::-1]))


if N < 10000:
    ans = 0
    for n in range((N + 1) // 2):
        a = func(n)
        len1 = np.dot(a, Y1)
        len2 = np.dot(a, Y2)
        ans = max(ans, len1, len2)
    
    print(ans)
else:
    ans = 0
    len1 = [0] * (N + 1) // 200
    len2 = [0] * (N + 1) // 200
    can1 = [0] * (N + 1) // 200
    can2 = [0] * (N + 1) // 200
    for n in range(0, (N + 1) // 2, 100):
        a = func(n)
        i = n // 100
        len1[i] = np.dot(a, Y1)
        len2[i] = np.dot(a, Y2)
        can1[i] = X[n + (N - n + 100)//2] - 2 * X[n] - (L - X[(N - n - 101)//2])
        can2[i] = X2[n + (N - n + 100) // 2] - 2 * X2[n] - (L - X2[(N - n - 101) // 2])
        ans = max(ans, len1[n], len2[n])
        
    for n, len_, can in enumerate(zip(len1, can1)):
        if len + can > ans:
            for j in range(100 * n, 100 * n + 100):
                ans = max(np.dot(func(j), Y1), ans)
                
    for n, len_, can in enumerate(zip(len2, can2)):
        if len + can > ans:
            for j in range(100 * n, 100 * n + 100):
                ans = max(np.dot(func(j), Y2), ans)
    print(ans)


### FIXED CODE ###

import numpy as np
import sys

L, N = map(int, input().split())
X = np.array([int(sys.stdin.readline()) for _ in range(N)])
X2 = L - X[::-1]
Y1 = np.concatenate(([X[0]], X[1:] - X[:-1], [L - X[-1]]))
Y2 = Y1[::-1]
Z = np.concatenate((np.arange(N, -1, -2), np.arange(N - 1, -1, -2)[::-1]))


def myfunc(n, x):
    return x[n + (N - n + 1)//2 - 1] - 2 * x[n - 1] - (L - x[N - (N - n + 1)//2])


len1 = np.dot(Z, Y1)
len2 = np.dot(Z, Y2)
x1 = X.tolist()
x2 = X2.tolist()
ans = max(len1, len2)
for n in range(1, (N + 1) // 2):
    len1 += myfunc(n, x1)
    len2 += myfunc(n, x2)
    ans = max(ans, len1, len2)

print(ans)
from fractions import Fraction
L = []
for i in range(1, 18):
    for j in range(1, 9*i+1):
        if (j-1)//9 >= i-1:
            temp = str(9-(-j%9)) + "9"*(i-1)
        else:
            temp = "1"
            t = j-1
            for rest in range(i-1, 0, -1):
                if t <= 9*(rest-1):
                    temp += "0"
                else:
                    temp += str(t-9*(rest-1))
                    t = 9*(rest-1)
        L.append((int(temp), j))
L.sort(reverse=True)
A = []
m = float("inf")
for l, k in L:
    if Fraction(l, k) <= m:
        A.append(l)
        m = Fraction(l, k)
k = int(input())
for i in range(k):
    print(A.pop())

### FIXED CODE ###

from fractions import Fraction
def S(n):
  res = 0
  while n:
    n, r = divmod(n, 10)
    res += r
  return res
k = int(input())
n = 1
for _ in range(k):
  print(n)
  n += 1
  m = Fraction(n, S(n))
  temp = n
  for d in range(len(str(n))+1):
    x = 10**(d+1)*(n//(10**(d+1))+1)-1
    if Fraction(x, S(x)) < m:
      m = Fraction(x, S(x))
      temp = x
  n = temp
A, B, K = [int(x) for x in input().split()]
X = list(range(A, B+1)))
for i in sorted(set(X[:K]) | set(X[-K:])):
    print(i)


### FIXED CODE ###

A, B, K = [int(x) for x in input().split()]

u = set(range(A, min(B+1, A+K)))
l = set(range(B, max(A-1, B-K),-1))
for i in sorted(u | l):
    print(i)
def solve():
    N = int(input())
    A = eval(input().replace(' ', '*'))
    if A > 10**18:
        print(-1)
    else:
        print(A)


if __name__ == '__main__':
    solve()


### FIXED CODE ###

def solve():
    N = int(input())
    A = list(map(int, input().split()))
    if 0 in A:
        print(0)
        exit()
    mul = A[0]
    for v in A[1:]:
        mul *= v
        if mul > 10**18:
            print(-1)
            exit()
    print(mul)





if __name__ == '__main__':
    solve()
from sys import stdin
from functools import reduce 

# 標準入力から読み込み
inputs = [list(map(int, input().split())) for _ in range(2)]
inputs = inputs[1]

if (0 in inputs):
  output = 0
else:
  output = reduce((lambda x, y: -1 if (x * y) > 1e18 or x < 0 or y < 0  else (x * y)), inputs)

print(output)

### FIXED CODE ###

from sys import stdin

# 標準入力から読み込み
inputs = [int(x) for x in stdin.readline().rstrip().split()]

# output = input[0] * input[1]
print(inputs[0] * inputs[1])
import sys
input = sys.stdin.readline
N = int(input())


node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)

def dfs(neighbor,start,visited):
    global k
    if sum(visited) == N:
        return 0
    if len(neighbor[start]) == 0:
        return 0
    for i in neighbor[start]:
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            dfs(neighbor,i,visited)


m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)
if N == 9999:
    print(100)
    print(' '.join([str(i) for i in range(N)]))
    exit()
dfs(neigh,nn,visited)

ans2 = ' '.join([str(ans[i]) for i in range(N)])


print(sum(c)-max(c))
print(ans2)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())


node = [0 for i in range(N)]
neigh = [[] for j in range(N)]
ans = [0 for i in range(N)]
visited = [0 for i in range(N)]
k = 1

for i in range(N-1):
    ai,bi = map(int,input().split())
    node[ai-1] += 1
    node[bi-1] += 1
    neigh[ai-1].append(bi-1)
    neigh[bi-1].append(ai-1)
c = list(map(int,input().split()))
c.sort(reverse=True)
flag = False
def dfs(neighbor,start):
    global flag
    global k
    if sum(visited) == N:
        return 0

    for i in neighbor[start]:
        
        if visited[i] == 0:
            ans[i] = c[k]
            k += 1
            visited[i] = 1
            try:
                dfs(neighbor,i)
            except RuntimeError:
                flag = True
                return 0




m = max(node)
nn = node.index(m)
#nn = [node[i] for i in range(N) if node[i] == m][0]
visited[nn] = 1
ans[nn] = max(c)

dfs(neigh,nn)
"""
if flag:
    print(100)
    print(' '.join([str(i) for i in range(N)]))
    exit()
"""
ans2 = ' '.join([str(ans[i]) for i in range(N)])


print(sum(c)-max(c))
print(ans2)
while 1:
    a, b = map(int, input().split())
    c = a + b
    c = str(c)
    print(len(c))
    

### FIXED CODE ###

import fileinput
for line in fileinput.input():
    a, b = map(int, line.split())
    print(len(str(a + b)))
n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = 10^9
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k]-list[j]
print(min)


### FIXED CODE ###

n,k = map(int,input().split())
list = []
for i in range(n):
  list.append(int(input()))
list.sort()
min = list[n-1]
for j in range(n-k+1):
  if list[j+k-1]-list[j] < min:
    min = list[j+k-1]-list[j]
print(min)
t= int(input())
for i in range(t):
    k=input().split()
    a=int(k[0])
    b=int(k[1])
    c=a*b
    d=int(c**.5)
    print(2*d-1-((d*(d+1)>=c)-(c==d*d and a!=b))

### FIXED CODE ###

t= int(input())
for i in range(t):
    k=input().split()
    a=int(k[0])
    b=int(k[1])
    c=a*b
    d=int(c**.5)
    print(2*d-1-((d*(d+1))>=c)-(c==d*d and a!=b))
# -*- coding: utf-8 -*-
a,b,c = list(map(int,input().split()))
ret = "No"
if len(set(a,b,c))==2:
    ret = "Yes"
print(ret)


### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b,c = list(map(int,input().split()))
ret = "No"
if len(set([a,b,c]))==2:
    ret = "Yes"
print(ret)
n = int(input())
heights = list(map(int, input().split()))

cnt = 0

seppenPlus = [0] * (n + max(heights))
seppenMinus = [0] * (n + max(heights))

for i in range(len(heights)):
    seppenPlusNum = i + heights[i]
    seppenMinusNum = i - heights[i]

    seppenPlus[seppenPlusNum] += 1

    if seppenMinusNum >= 0:
        seppenMinus[seppenMinusNum] += 1

for i in range(len(seppenPlus)):
    cnt += seppenPlus[i] * seppenMinus[i]

print(cnt)

### FIXED CODE ###

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

diffMax = 2 * max(heights)
diffMin = 2 * min(heights)

cnt = 0

arrSize = min([max([i + heights[i] for i in range(len(heights))]),max([i - heights[i] for i in range(len(heights))])]) + 1

seppenPlus = [0] * arrSize
seppenMinus = [0] * arrSize


for i in range(len(heights)):
    seppenPlusNum = i + heights[i]
    seppenMinusNum = i - heights[i]

    if seppenPlusNum < arrSize:
    	seppenPlus[seppenPlusNum] += 1

    if seppenMinusNum >= 0:
        seppenMinus[seppenMinusNum] += 1

for i in range(len(seppenPlus)):
    cnt += seppenPlus[i] * seppenMinus[i]

print(cnt)
h,w=map(int,input().split())
a=[0]*h+2
a[0]='.'*(w+2)
a[h+1]=a[0]
for _ in range(1,h+1):
  j=input()
  a[_]='.'+j+'.'
x='Yes'
for i in range(1,h+1):
  for j in range(1,w+1):
    if a[i][j]=='#':
      if a[i-1][j]=='.' and a[i+1][j]=='.' and a[i][j-1]=='.' and a[i][j+1]=='.':
        x='No'
print(x)

### FIXED CODE ###

h,w=map(int,input().split())
a=[0]*(h+2)
a[0]='.'*(w+2)
a[h+1]=a[0]
for _ in range(1,h+1):
  j=input()
  a[_]='.'+j+'.'
x='Yes'
for i in range(1,h+1):
  for j in range(1,w+1):
    if a[i][j]=='#':
      if a[i-1][j]=='.' and a[i+1][j]=='.' and a[i][j-1]=='.' and a[i][j+1]=='.':
        x='No'
        break
print(x)
import numpy as np
p = map(int, input().split())
ps = list(map(lambda x, y: np.array([x, y]), p[::2], p[1::2]))+ [None, None]

ans = ""
for s, d, i in zip(ps[0:-1], ps[1:], range(2,4)):
  v = d - s
  s = d
  d = s + v.dot([[0,1], [-1,0]])
  ans += " ".join(map(str, d))
  ps[i] = d
print(ans[1:])


### FIXED CODE ###

p = list(map(int, input().split()))
ps = list(zip(p[::2], p[1::2]))

ans = ""
for _ in range(2):
  v = list(map(lambda x, y: x - y, ps[1], ps[0]))
  v = [-v[1], v[0]]
  ps = [ps[1], list(map(lambda x, y: x + y, ps[1], v))]
  ans += " " + " ".join(map(str, ps[1]))

print(ans[0:])
n = int(input())
commands = [input().split() for _ in range(n)]

l = []
for com in commands:
    if com[0]=='insert':
        l.insert(0, com[1])
    elif com[0]=='delete':
        l.remove(com[1])
    elif com[0]=='deleteFirst':
        l.pop(0)
    elif com[0]=='deleteLast':
        l.pop()
s = ' '.join(l)
print(s)


### FIXED CODE ###

from collections import deque

n = int(input())
commands = [input() for _ in range(n)] # splitとかしてると間に合わない

l = deque()
for com in commands:
    if com[0]=='i':
        l.appendleft(com[7:])
    elif com[6]=='F':
        l.popleft()
    elif com[6]=='L':
        l.pop()
    else:
        try:
            l.remove(com[7:])
        except:
            pass

s = ' '.join(l)
print(s)
n = int(input())
h = list(map(int,input().split()))
cnt = 0
for i in range(n-1):
    cnt +=min(h[i],h[i+1])
print(sum[h]-cnt)

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
cnt = 0
for i in range(n-1):
    cnt +=min(h[i],h[i+1])
print(sum(h)-cnt)
import math
from functools import reduce

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

print(reduce(math.gcd, A))

### FIXED CODE ###

import fractions
from functools import reduce

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

print(reduce(fractions.gcd, A))
S = input()
S[:3] = '2018'
print(S)

### FIXED CODE ###

S = input()
print(S.replace('17', '18'))