Harryxun/stf_run huggingface dataset:
a = input()
b = 0
if a >= 82:
  print("No")
else:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1)==a:
        print("Yes")
        b = 1
        break;
if b == 0:
  print("No")

### FIXED CODE ###

a = int(input())
b = 0
if a<= 81:
  for i in range(9):
    for j in range(9):
      if (i+1)*(j+1)==a:
        b=1
        break
if b==0:
  print("No")
else:
  print("Yes")
K,N = map(int, input().split())
An_list = np.array(input().split(), dtype=int)

An_delta_list = np.diff(An_list)
An_delta_list = np.append(An_delta_list, K - An_list[N-1])
An_delta_max = np.max(An_delta_list)
result = np.sum(An_delta_list) - An_delta_max
print(result)

### FIXED CODE ###

import numpy as np

K,N = map(int, input().split())
An_list = np.array(input().split(), dtype=int)

An_delta_list = np.diff(An_list)
An_delta_list = np.append(An_delta_list, (K - An_list[-1])+An_list[0])
An_delta_max = np.max(An_delta_list)
result = np.sum(An_delta_list) - An_delta_max
print(result)
if __name__ == "__main__":

    a = int(input())
    b = int(input())
    c = int(input())
    d = int(input())

    if b <= 0 :
        if d <= 0:
            xy = a * c
        elif d > 0:
            if c > 0:
                xy = b * c
            elif c == 0:
                xy = 0
            elif c < 0:
                xy = a * c
    elif b > 0:
        if a >= 0:
            if d <= 0:
                xy = a * d
            elif d > 0:
                xy = b * d
        elif a < 0:
            if d <= 0:
                xy = a * c
            elif d > 0:
                if c >= 0:
                    xy = b * d
                elif c < 0:
                    if abs(a * c) > abs(b * d):
                        xy = a * c
                    else:
                        xy = b * d

    print(xy)


### FIXED CODE ###

if __name__ == "__main__":

    a,b,c,d = (int(x) for x in input().split())

    if b <= 0 :
        if d <= 0:
            xy = a * c
        elif d > 0:
            if c > 0:
                xy = b * c
            elif c == 0:
                xy = 0
            elif c < 0:
                xy = a * c
    elif b > 0:
        if a >= 0:
            if d <= 0:
                xy = a * d
            elif d > 0:
                xy = b * d
        elif a < 0:
            if d <= 0:
                xy = a * c
            elif d > 0:
                if c >= 0:
                    xy = b * d
                elif c < 0:
                    if abs(a * c) > abs(b * d):
                        xy = a * c
                    else:
                        xy = b * d

    print(xy)
N = int(input())
xyh = []
xyh1 = []
for _ in range(N):
	x0, y0, h0 = map(int, input().split())
	xyh.append([x0,y0,h0])
	if h0 > 0:
		xyh1.append([x0,y0,h0])

def absum(x, y, h, Cx, Cy):
	return abs(x - Cx) + abs(y - Cy) + h


for Cx in range(101):
	for Cy in range(101):
		for i in range(len(xyh1)-1):
			if absum(xyh1[i][0], xyh1[i][1], xyh1[i][2], Cx, Cy) != absum(xyh1[i+1][0], xyh1[i+1][1], xyh1[i+1][2], Cx, Cy):
				break
		else:
			H = absum(xyh1[i][0], xyh1[i][1], xyh1[i][2], Cx, Cy)
			print(Cx, Cy, H)

### FIXED CODE ###

N = int(input())
xyh = []
xyh1 = []
for _ in range(N):
	x0, y0, h0 = map(int, input().split())
	xyh.append([x0,y0,h0])
	if h0 > 0:
		xyh1.append([x0,y0,h0])

def absum(x, y, h, Cx, Cy):
	return abs(x - Cx) + abs(y - Cy) + h

if len(xyh1) > 1:
	for Cx in range(101):
		for Cy in range(101):
			for i in range(len(xyh1)-1):
				if absum(xyh1[i][0], xyh1[i][1], xyh1[i][2], Cx, Cy) != absum(xyh1[i+1][0], xyh1[i+1][1], xyh1[i+1][2], Cx, Cy):
					break
			else:
				H = absum(xyh1[i][0], xyh1[i][1], xyh1[i][2], Cx, Cy)
				print(Cx, Cy, H)
else:
	print(xyh1[0][0], xyh1[0][1], xyh1[0][2])
n = int(input())
a = list(map(int,input().split()))
minHP = float('inf')
for i in range(n):
    HP = 0
    for j in range(100):
        HP += (a[j] - (i + 1)) ** 2
    if minHP > HP:
        minHP = HP
print(minHP)

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
minHP = float('inf')
for i in range(max(a)):
    HP = 0
    for j in range(n):
        HP += (a[j] - (i + 1)) ** 2
    if minHP > HP:
        minHP = HP
print(minHP)
n = int(input())
 
str = input()
sum = 0
for i in range(n-2):
  for j in range(i+1, n-1):
     if str[i] == str[j]:
        break
    for k in range(j+1, n):
      if str[i] != str[k] and str[j] != str[k] and j - i != k - j:
        sum += 1

print(sum)

### FIXED CODE ###

n = int(input())
 
str = input()

r = str.count('R')
g = str.count('G')
b = str.count('B')
sum = r * g * b
for i in range(n-2):
  for j in range(i+1, n-1):
    k = 2 * j - i
    if k < n:
      if str[i] != str[j] and str[i] != str[k] and str[j] != str[k] :
        sum -= 1
    
print(sum)
import math

N = 1000001
 
spf = [*range(N)]
i = 2
while i * i < N:
  if spf[i] == i:
    for j in range(i * i, N, i):
      if spf[j] == j:
        spf[j] = i
  i += 1
  
r = 'pairwise'

input()
d = None
p = 1
for x in map(int, input().split()):
  d = math.gcd(d or x, x)
  s = set()
  while x > 1:
    p = spf[x]
    if p in u:
      r = 'setwise'
    s.add(p)
    x //= p
  u |= s
import math

N = 1000001
 
spf = [*range(N)]
i = 2
while i * i < N:
  if spf[i] == i:
    for j in range(i * i, N, i):
      if spf[j] == j:
        spf[j] = i
  i += 1
  
r = 'pairwise'

input()
d = None
p = 1
for x in map(int, input().split()):
  d = math.gcd(d or x, x)
  e = maths = set()
  while x > 1:
    p = spf[x]
    if p in u:
      r = 'setwise'
    s.add(p)
    x //= p
  u |= s
print((r, 'not')[d > 1], 'coprime')


### FIXED CODE ###

N = 1000001
 
spf = [*range(N)]
i = 2
while i * i < N:
  if spf[i] == i:
    for j in range(i * i, N, i):
      if spf[j] == j:
        spf[j] = i
  i += 1
  
r = 'pairwise'
n = int(input())
a = [int(x) for x in input().split() if x > '1']
if len(a) > 1:
  u = set()
  i = None
  for x in a:
    s = set()
    while x > 1:
      p = spf[x]
      if p in u:
        r = 'setwise'
      s.add(p)
      x //= p
    u |= s
    if len(a) == n:
      if i is None: i = s
      else: i &= s
  if i:
    r = 'not'
print(r, 'coprime')
def cur(i):
    if p[i]!=False: return p[i]
    if s[i]=="R":
        if s[i+1]=="L": p[i]=1
        else: p[i]=cur(i+1)+1
    if s[i]=="L":
        if s[i-1]=="R": p[i]=-1
        else: p[i]=cur(i-1)-1 
    return p[i]

s=input()
n=len(s)
p=[False for _ in range(n)]

for i in range(n):
    cur(i)

ans=[0]*n
for i in range(n):
    if p[i]>0:
        ans[i+(p[i]//2)*2]+=1
    else: ans[i+p[i]+p[i]%2]+=1
print(*ans)

### FIXED CODE ###

import sys
s=input()
n=len(s)
p=[0 for _ in range(n)]

for i in range(n):
    if s[i]=="L": p[i]=p[i-1]-1 if s[i-1]=="L" else -1
for i in range(n-1,-1,-1):
    if s[i]=="R": p[i]=p[i+1]+1 if s[i+1]=="R" else 1

ans=[0]*n
for i in range(n):
    if p[i]>0:
        ans[i+(p[i]//2)*2]+=1
    else:
        if p[i]%2==0: ans[i+p[i]]+=1
        else: ans[i+p[i]+1]+=1
print(*ans)
import sys
while 1:print(*[int(b)*2**i for i,b in enumerate(bin(int(sys.stdin.readline()))[2:][::-1])if int(b)])


### FIXED CODE ###

import sys
for d in sys.stdin:print(*[w for w in[2**i for i in range(10)]if int(d)&w])
X,Y,A,B,C = map(int,input().split())
Pi=list(map(int,input().split()))
Qi=list(map(int,input().split()))
Ri=list(map(int,input().split()))

Pi.sort()
Qi.sort()
Ri.sort(reverse=True)

r=0
p=A-X
q=B-Y
while(r<C):
  if(Pi[p]>=Ri[r] and Qi[q]>=Ri[r]):
    break;
  elif(p>=A):
    #qi
    if(Qi[q]>=Ri[r]):
      break;
    else:
      Qi[q]=Ri[r]
      q+=1
  elif(q>=B):
    #pi
    if(Pi[p]>=Ri[r]):
      break;
    else:
      Pi[p]=Ri[r]
      p+=1
  elif(Pi[p]>=Qi[q]):
    #qi
    if(Qi[q]>=Ri[r]):
      break;
    else:
      Qi[q]=Ri[r]
      q+=1
  else:
    #pi
    if(Pi[p]>=Ri[r]):
      break;
    else:
      Pi[p]=Ri[r]
      p+=1
  
  r+=1

psum=sum(Pi[A-X:A])
qsum=sum(Qi[B-Y:B])


happy = psum + qsum

print(happy)

### FIXED CODE ###

X,Y,A,B,C = map(int,input().split())
Pi=list(map(int,input().split()))
Qi=list(map(int,input().split()))
Ri=list(map(int,input().split()))

Pi.sort()
Qi.sort()
Ri.sort(reverse=True)


#Ri
#for i in range(X,)
r=0
p=A-X
q=B-Y
while(r<C):
  if(p>=A and q>=B):
    break
  elif(p>=A):
    #qi
    if(Qi[q]>=Ri[r]):
      break;
    else:
      Qi[q]=Ri[r]
      q+=1
  elif(q>=B):
    #pi
    if(Pi[p]>=Ri[r]):
      break;
    else:
      Pi[p]=Ri[r]
      p+=1
  elif(Pi[p]>=Qi[q]):
    #qi
    if(Qi[q]>=Ri[r]):
      break;
    else:
      Qi[q]=Ri[r]
      q+=1
  elif(Pi[p]<Qi[q]):
    #pi
    if(Pi[p]>=Ri[r]):
      break;
    else:
      Pi[p]=Ri[r]
      p+=1
  elif(Pi[p]>=Ri[r] and Qi[q]>=Ri[r]):
    break
  
  r+=1

psum=sum(Pi[A-X:A])
qsum=sum(Qi[B-Y:B])


happy = psum + qsum

print(happy)
K=int(input())
S=input()
n=K+len(S)
MAX=1000000
fac=[0]*MAX
finv=[0]*MAX
inv=[0]*MAX
MOD=10**9+7
#テーブルを作る前処理
def COMinit():
    fac[0]=fac[1]=1
    finv[0]=finv[1]=1
    inv[1]=1
    for i in range(2,MAX):
      fac[i] = fac[i-1] * i % MOD
      inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
      finv[i] = finv[i - 1] * inv[i] % MOD

#二項係数計算
def comb(n,k):
  if (n < k):
    return 0
  if (n < 0 or k < 0):
    return 0
  else:
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

COMinit()
com=1
q=(26**K)%(10**9+7)
ans=0
for i in range(K+1):
  ans+=(q*comb(len(S)+i-1,i))%(10**9+7)#comb(len(S)+i-1,len(S)-1))%(10**9+7)
  q=(q*423076927)%(10**9+7)
  #com=(com*(len(S)+i))//(i+1)
print(ans%(10**9+7))
#print((25*576923081)%(10**9+7))

### FIXED CODE ###

K=int(input())
S=input()
n=K+len(S)
MAX=2000000
fac=[0]*MAX
finv=[0]*MAX
inv=[0]*MAX
MOD=10**9+7
#テーブルを作る前処理
def COMinit():
    fac[0]=fac[1]=1
    finv[0]=finv[1]=1
    inv[1]=1
    for i in range(2,MAX):
      fac[i] = fac[i-1] * i % MOD
      inv[i] = MOD - inv[MOD%i] * (MOD // i) % MOD
      finv[i] = finv[i - 1] * inv[i] % MOD

#二項係数計算
def comb(n,k):
  if (n < k):
    return 0
  if (n < 0 or k < 0):
    return 0
  else:
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD

COMinit()
com=1
q=(26**K)%(10**9+7)
ans=0
for i in range(K+1):
  ans+=(q*comb(len(S)+i-1,i))%(10**9+7)#comb(len(S)+i-1,len(S)-1))%(10**9+7)
  q=(q*423076927)%(10**9+7)
  #com=(com*(len(S)+i))//(i+1)
print(ans%(10**9+7))
#print((25*576923081)%(10**9+7))
N = int(input())
def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)
print(num2alpha(N).lower())

### FIXED CODE ###

A = input()
if  A.islower():
  print('a')
else:
  print('A')
from collections import defaultdict


def dfs(v, parent, d):
    depth[v] = d
    for to, cost in tree[v]:
        if to == parent:
            continue
        dfs(to, v, d + cost)


depth = defaultdict(int)
tree = defaultdict(list)
n = int(input())
for i in range(n-1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    tree[a].append((b, c))
    tree[b].append((a, c))

q, k = map(int, input().split())
k -= 1

dfs(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    print(depth[x] + depth[y])


### FIXED CODE ###

import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)


def dfs(v, parent, d):
    depth[v] = d
    for to, cost in tree[v]:
        if to == parent:
            continue
        dfs(to, v, d + cost)


depth = defaultdict(int)
tree = defaultdict(list)
n = int(input())
for i in range(n - 1):
    a, b, c = map(int, input().split())
    a -= 1
    b -= 1
    tree[a].append((b, c))
    tree[b].append((a, c))

q, k = map(int, input().split())
k -= 1

dfs(k, -1, 0)
for i in range(q):
    x, y = map(int, input().split())
    x -= 1
    y -= 1
    print(depth[x] + depth[y])
l=map(int,input().split())
x=l[0]
y=l[1]
print(x+y/2)

### FIXED CODE ###

X,Y = map(int,input().split())
K =int((X+(0.5*Y)))
print(K)
def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return int((a * b) / gcd(a, b))

N = int(input())
T = [int(input()) for i in range(N)]

a = T[0]

for b in T[1:]:
    a = lcm(a, b)

print(a)

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        a, b = b, a
    while b > 0:
        a, b = b, a % b
    return a

def lcm(a, b):
    return (a * b) // gcd(a, b)

N = int(input())
T = [int(input()) for i in range(N)]

ans = T[0]

for t in T[1:]:
    ans = lcm(ans, t)

print(ans)
X, Y, A, B, C = map(int,input().split())
P = [int(_) for _ in input().split()]
Q = [int(_) for _ in input().split()]
R = [int(_) for _ in input().split()]

P.sort()
Q.sort()
R.sort()
R.reverse()

P = P[A-X:]
Q = Q[B-Y:]

i = 0
j = 0

while min(P[i],Q[j])<R[i+j]:
    if P[i] < Q[j]:
        i += 1
    else:
        j += 1
    if i+j == C:
        break

ans = 0
for e in P[i:]:
    ans = ans + e
for e in Q[j:]:
    ans = ans + e
for a in range(i+j):
    ans = ans + R[a]

print(ans)


### FIXED CODE ###

X, Y, A, B, C = map(int,input().split())
P = [int(_) for _ in input().split()]
Q = [int(_) for _ in input().split()]
R = [int(_) for _ in input().split()]

P.sort()
Q.sort()
R.sort()
R.reverse()

P = P[A-X:]
Q = Q[B-Y:]

P.append(10**9+1)
Q.append(10**9+1)
R.append(0)


i = 0
j = 0


while min(P[i],Q[j])<R[i+j]:
    if P[i] < Q[j]:
        i += 1
    else:
        j += 1
    if i+j == C:
        break

P.remove(10**9+1)
Q.remove(10**9+1)
R.remove(0)

ans = 0
for e in P[i:]:
    ans = ans + e
for e in Q[j:]:
    ans = ans + e
for a in range(i+j):
    ans = ans + R[a]

print(ans)
print(float(input()) ** EXPONENT)

### FIXED CODE ###

print(int(input()) ** 3)
while True:
    table=input().split()
a=int(table[0])
op=table[1]
b=int(table[2])

if op=='?':
    break
elif op=='+':
    print("%d" %(a+b))
elif op=='-':
    print("%d" %(a-b))
elif op=='*':
    print("%d" %(a*b))
elif op=='/':
    print("%d" %(a/b))
    
    


### FIXED CODE ###

while True:
    table=input().split()
    
    a=int(table[0])
    b=table[1]
    c=int(table[2])
    
    if b=='?':
        break
    elif b=='+':    
        print("%d"%(a+c))
    elif b=='-':
        print("%d"%(a-c))
    elif b=='*':
        print("%d"%(a*c))
    elif b=='/':
        print("%d"%(a/c))
n,m,x=map(int,input().split())
b=[0]*(N+1)
A=list(map(int,input().split()))
for a in A:
  b[a]=1
c=0
for i in range(x):
  c+=b[i]
print(c if c>=n-c else n-c)


### FIXED CODE ###

n,m,x=map(int,input().split())
b=[0]*(n+1)
A=list(map(int,input().split()))
for a in A:
  b[a]=1
c=0
for i in range(x):
  c+=b[i]
print(m-c if c>=m-c else c)
def resolve():
    N = int(input())
    n_array = np.array(list(map(int,input().split())))
    mea = int(np.average(n_array) + 0.5)
    ans = n_array - mea 
    print(sum(ans*ans))
resolve()

### FIXED CODE ###

import numpy as np

def resolve():
    N = int(input())
    n_array = np.array(list(map(int,input().split())))
    mea = int(np.average(n_array) + 0.5)
    ans = n_array - mea 
    print(sum(ans*ans))
resolve()
from collections import defaultdict
dic = defaultdict(int)
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
for x,y in zip(A,B):
  dic[x] += 1
  dic[y] += 1
L = list(dic.values())
MAX = max(L)
if MAX > N:
  print("No"); exit()
INF = float("inf")
dicA_min = defaultdict(lambda: INF); dicA_max = defaultdict(lambda: 0)
dicB_min = defaultdict(lambda: INF); dicB_max = defaultdict(lambda: 0)
for i in range(N):
  dicA_min[A[i]] = min(dicA_min[A[i]],i)
  dicA_max[A[i]] = max(dicA_max[A[i]],i)
  dicB_min[B[i]] = min(dicB_min[B[i]],i)
  dicB_max[B[i]] = max(dicB_max[B[i]],i)
#print(dicA_min,dicA_max)
L = list(dicB_min.keys())
mink = -INF
maxk = INF
for t in L:
  if dicA_min[t] == INF:
    continue
  mink = max(dicA_max[t]-dicB_min[t]+1,mink)
  maxk = min(dicA_min[t]+N-dicB_max[t]-1,maxk)
#print(mink,maxk)
if mink >= 0:
  ans = B[-mink:] + B[:-mink]
else:
  ans = B[-mink:] + B[:-mink]
print("Yes")
print(*ans)

### FIXED CODE ###

from collections import defaultdict
dic = defaultdict(int)
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
for x,y in zip(A,B):
  dic[x] += 1
  dic[y] += 1
L = list(dic.values())
MAX = max(L)
if MAX > N:
  print("No"); exit()
INF = float("inf")
dicA_min = defaultdict(lambda: INF); dicA_max = defaultdict(lambda: 0)
dicB_min = defaultdict(lambda: INF); dicB_max = defaultdict(lambda: 0)
for i in range(N):
  dicA_min[A[i]] = min(dicA_min[A[i]],i)
  dicA_max[A[i]] = max(dicA_max[A[i]],i)
  dicB_min[B[i]] = min(dicB_min[B[i]],i)
  dicB_max[B[i]] = max(dicB_max[B[i]],i)
#print(dicA_min,dicA_max)
L = list(dicB_min.keys())
mink = -INF
maxk = INF
Flag = False
for t in L:
  if dicA_min[t] == INF:
    continue
  mink = max(dicA_max[t]-dicB_min[t]+1,mink)
  maxk = min(dicA_min[t]+N-dicB_max[t]-1,maxk)
  Flag = True
if not Flag:
  print("Yes")
  print(*B)
  exit()
#print(mink,maxk)
if mink >= 0:
  ans = B[-mink:] + B[:-mink]
else:
  ans = B[-mink:] + B[:-mink]
print("Yes")
print(*ans)
l1=list(map(int,input().split()))
l2=list(map(int,input().split()))

cnt=0
for i in range(len(l1)):
    l[i]==l[-i-1]:
    cnt+=1

if cnt == 3:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s1=input()
s2=input()

cnt=0
for i in range(len(s1)):
    if s1[i]==s2[-i-1]:
        cnt+=1

if cnt == 3:
    print("YES")
else:
    print("NO")
n=int(input())

result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,len(str(n)+1):
            if k%(10**j)==3:
                result.append(i)
                break
            else:
                k=k//10**j
        else:
            continue

print(" ", *result," ")

### FIXED CODE ###

n=int(input())
 
result=[]
for i in range(1,n+1):
    if i %3==0:
        result.append(i)
    else:
        k=i
        for j in range(1,5):
            if k%10==3:
                result.append(i)
                break
            else:
                k=k//10
        else:
            continue
 
print("",*result)
x = int(input())
if x==1:
  print(0)
else:
  print(1

### FIXED CODE ###

x = int(input())
print(x^1)
n,x= list(map(int, input().split()))

L=list(map(int, input().split()))
d=0

for i in range(1,n):
    d+=L[i-1]
    if d>x:
        ans=i
        break
print(ans)

### FIXED CODE ###

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

L=list(map(int, input().split()))
D=[0]
for i in range(0,n):
    D.append(D[i]+L[i])
ans=0
for i in range(n+1):
    if D[i]<=x:
        ans+=1
    else:
        break

print(ans)
import sys

iT = int(input())
aR = [[int(x) for x in sLine.split()] for sLine in sys.stdin.readlines()]
#わからんから解説見た。解説見たけどgcdの下りが自分で導出できんかったのでとりあえ
ずバカループでなんとかしてみた。これで通るかな。
def fFunc(iA,iB,iC,iD):
    if iA < iB or iD < iB:
        return False
    if iC >= iB :
        return True
    iJ = iA % iB
    iK = iD % iB
    i = 1
    while True:
        j = iJ + i * iK
        if iB <= j:
            return True
        else:
            if iC < j:
                return False
        if iK == 0:
            return True
        i += 1
    return True

for eR in aR:
    if fFunc(*eR) :
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

import sys

iT = int(input())
aR = [[int(x) for x in sLine.split()] for sLine in sys.stdin.readlines()]

def fGcd(iX,iY):
    while iY:
        iX,iY= iY,iX%iY
    return iX

#これものすごくわりきってるけど通るのか？

def fFunc(iA,iB,iC,iD):
    if iA < iB or iD < iB:
        return False
    elif iC >= iB :
        return True
    elif iC < iA % iB :
        return False
    elif iB -iC - 1 < fGcd(iB,iD) :
        return True
    else:
        return False

for eR in aR:
    if fFunc(*eR) :
        print("Yes")
    else:
        print("No")
l,r = map(int,input().split())
li = []
if r-l>=2019:
    print(0)
elif r-l<2019:
    for i in range(l,r):
        for j in range(i+1,r+1):
            li.append(i*j%2019)
            if i*j%2019 == 0:
                break
        if i*j%2019 == 0:
            break
                
print(min(li))

### FIXED CODE ###

l,r = map(int,input().split())
ans = 10**20
if r-l>=2019:
    print(0)
    exit()
elif r-l<2019:
    for i in range(l,r+1):
        for j in range(i+1,r+1):
            ans = min(ans,i*j%2019)
            if i*j%2019 == 0:
                break
print(ans)
import numpy as np
N,M = (int(x) for x in input().split())
H   = np.array([int(x) for x in input().split()])
Way = np.zeros((N,N),dtype=bool)
for T in range(0,M):
    A,B = (int(x) for x in input().split())
    Way[A-1,B-1] = True
    Way[B-1,A-1] = True
    
Count = 0
for TT in range(0,N):
    TrueIndex = np.where(Way[TT,:]==True)
    if np.all(H[TT]>H[TrueIndex]):
        Count = Count+1
print(Count)

### FIXED CODE ###

N,M = (int(x) for x in input().split())
H   = [int(x) for x in input().split()]
Way = [[] for I in range(N)]
for T in range(0,M):
    A,B = (int(x) for x in input().split())
    Way[A-1].append(B)
    Way[B-1].append(A)
    
Count = 0
for TT in range(0,N): 
    if all(H[TT]>Ele for Ele in [H[I-1] for I in Way[TT]]):
        Count = Count+1
print(Count)
n, a = input(), input()
print(" ".join(["0"]*n))

### FIXED CODE ###

from collections import deque
n = int(input())
a = list(input().split())

ball = []
for i in range(n, 0, -1):
    c = 2
    while i * c <= n:
        if a[i*c-1] == "1":
            a[i-1] = "1" if a[i-1] == "0" else "0"
        c += 1
    if a[i-1] == "1":
        ball.append(str(i))

print(len(ball))
if ball != []: print(" ".join(ball))
N = int(input())
scores = []
cnt = 0
for i in range(N):
    scores.append(int(input()))

scores.sort()
gokei = sum(scores)

while True:
    if gokei % 10 == 0:
        gokei -= scores[cnt]
        cnt += 1
        if cnt > len(scores):
            print(0)
            break
    else:
        print(gokei)
        break

### FIXED CODE ###

import sys

N = int(input())
scores = []
box = []
cnt = 0
for i in range(N):
    scores.append(int(input()))

scores.sort()
gokei = sum(scores)

if gokei % 10 == 0:
    for i in range(N):
        aaa = gokei - scores[i]
        if aaa % 10 != 0:
            box.append(aaa)

else:
    print(gokei)
    sys.exit()
    
if box != []:
    print(max(box))
else:
    print(0)
a = input()
b = input()
h = input()

print((a + b) * h / 2)

### FIXED CODE ###

a = int(input())
b = int(input())
h = int(input())

print((a + b) * h // 2)
import numpy as np
(n, m) = list(map(int, input().split()))
a = np.array(list(map(int, input().split())))
a = np.cumsum(a)
a %= m
count = np.sum(a == 0)
unique, counts = np.unique(a, return_counts=True) 
counts = np.array(counts)
counts = counts * (counts - 1) // 2
print(count + np.sum(counts))

### FIXED CODE ###

import numpy as np
(n, m) = list(map(int, input().split()))
a = np.array(list(map(int, input().split()))).astype("int64") 
a = np.cumsum(a)
a %= m
count = np.sum(a == 0)
a.sort()
tc = 1
for i in range(1, n):
    if a[i - 1] == a[i]:
        tc += 1
    else:
        count += tc * (tc - 1) // 2
        tc = 1
else:
    count += tc * (tc - 1) // 2
print(count)
abc = [map(int, input().split())]
print(sum(abc) - max(abc))


### FIXED CODE ###

abc = list(map(int, input().split()))
print(sum(abc) - max(abc))
import itertools
l,r = map(int,input().split())

sc = list(itertools.combinations(range(l,r+1),2))

print(min([s[0]*s[1]%2019 for s in sc]))


### FIXED CODE ###

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

a = []
r = min(r,l+2019)
for i in range(l,r):
    for j in range(i+1,r+1):
        a.append(i*j%2019)

print(min(a))
a,b = map(int,input().split(" "))
if a <= b:
  pritn(a)
else:
  print(a-1)

### FIXED CODE ###

a,b = map(int,input().split(" "))
if a <= b:
  print(a)
else:
  print(a-1)