Harryxun/stf_run huggingface dataset:
N = int(input())

reds = []
for _ in range(N):
    reds.append(tuple(map(int, input().split())))
    
blues = []
for _ in range(N):
    blues.append(tuple(map(int, input().split())))

reds.sort()
blues.sort()

ans = 0
for blue in blues:
    c, d = blue

    # 条件に当てはまる赤を抽出
    targets = [red for red in reds if red[0] < c and red[1] < d]
    targets.sort(key=lambda x:x[1])

    # 赤のうち一番y座標が大きいものを抽出
    if reds_under_x:
        target = reds_under_x.pop()
        reds.remove(target)
        ans += 1

print(ans)


### FIXED CODE ###

N = int(input())

reds = []
for _ in range(N):
    reds.append(tuple(map(int, input().split())))
    
blues = []
for _ in range(N):
    blues.append(tuple(map(int, input().split())))

reds.sort()
blues.sort()

ans = 0
for blue in blues:
    c, d = blue

    # 条件に当てはまる赤を抽出
    targets = [red for red in reds if red[0] < c and red[1] < d]
    targets.sort(key=lambda x:x[1])

    # 赤のうち一番y座標が大きいものを抽出
    if targets:
        target = targets.pop()
        reds.remove(target)
        ans += 1

print(ans)
n,m=map(int,input().split())
a = []

mod = 1_000_000_007

dp=[0]*(n+1)

dp[0]=1
dp[1]=1

for _ in range(m):
    s = int(input())
    a.append(s)

    dp[s]=0


for i in range(2,n+1):
    if i in a:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[-1]%mod) 


### FIXED CODE ###

n,m=map(int,input().split())
a = []

mod = 1000000007

dp=[0]*(n+1)

dp[0]=1
dp[1]=1
d={}
for j in range(n+1):
    d[j]=0

for _ in range(m):
    s = int(input())
    d[s]=1
    dp[s]=0

for i in range(2,n+1):
    if d[i]==1:
        dp[i] = 0
    else:
        dp[i] = dp[i-1] + dp[i-2]

print(dp[-1]%mod)
n=input()
s=0
for i in n:
  s+=int(i)
  s=s%9
if s%9==0:
  print(Yes)
else:
  print("No")
  

### FIXED CODE ###

n=input()
s=0
for i in n:
  s+=int(i)
  s=s%9
if s%9==0:
  print("Yes")
else:
  print("No")
n = int(input())
a = [int(i) for i in input().split()]
x = 0
for j in range(0,n):
  if not (((a[j] % 2) == 0) and (((a[j] % 3) != 0) and (a[j] % 5 != 0))):
    x = 1
if x == 1:
  print('APPROVED')
else:
  print('DENIED')

### FIXED CODE ###

x, y, z = input().split()
if x == y:
  if x == z and y == z:
    print("No")
  else:
    print("Yes")
elif x == z:
  if x == y and y == z:
    print("No")
  else:
    print("Yes")
elif y == z:
  if x == y and x == z:
    print("No")
  else:
    print("Yes")
else:
  print("No")
n = int(input())
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
		count += 1
print(count)

### FIXED CODE ###

n = int(input())
count = 0
for i in range(1, n + 1):
    if len(str(i)) % 2 == 1:
    	count += 1
print(count)
N = input()
list = list(input() for i in range(N))
print(len(set(list)))

### FIXED CODE ###

N = int(input())
list = [input() for i in range(N)]
print(len(set(list)))
S = input()
ans = 753
for i in range(len(S) - 2):
	tmp = S[i] * 100 + S[i + 1] * 10 + S[i + 2]
	if abs(tmp - 753) < ans:
		ans = tmp
print(ans)


### FIXED CODE ###

S = input()
ans = 753
for i in range(len(S) - 2):
	tmp = abs(int(S[i]) * 100 + int(S[i + 1]) * 10 + int(S[i + 2]) - 753)
	if tmp < ans:
		ans = tmp
print(ans)
S = int(input())

def dfs(res, depth, path, S):
    res.append(path)
    if depth == len(S) - 1:
        return
    for i in range(depth + 1, len(S)):
        dfs(res, i, int(S[depth:i+1]), S)

res = []

dfs(res, -1, [], S)
print(sum(res))


### FIXED CODE ###

from functools import reduce
S = input()

def dfs(res, depth, path, S):
    if len(''.join(path)) == len(S):
        res.append(path)
    for i in range(depth + 1, len(S) + 1):
        dfs(res, i, path + [S[depth:i]], S)

res = []

dfs(res, 0, [], S)

print(sum(int(num) for nums in res for num in nums))
a, b, c = map(int, input_raw().split())
sum = 0

for i in range(a,b):
  if c%i == 0:
     sum = sum + 1
  else:
     sum = sum

print'%s' % (sum)

### FIXED CODE ###

a, b, c = map(int, raw_input().split())
sum = 0

for i in range(a,b+1):
  if c%i == 0:
     sum = sum + 1

print sum
n,m=map(int,input().split())
a = [-1]*(n+1)

ans = 0
for i in range(m):
  s,c=map(int,input().split())
  if a[s] == -1 or a[s] == c:
    a[s] = c
  else:
    print(-1)
    exit()

if a[1] == 0:
  if n>1:
    print(-1)
    exit()
  else:
    print(ans)
else:
  ans = max(1, a[1])
  for i in range(2, n+1)
    ans = ans*10+max(0, a[i])
print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
a = [-1]*(n+1)

ans = 0
for i in range(m):
  s,c=map(int,input().split())
  if a[s] == -1 or a[s] == c:
    a[s] = c
  else:
    print(-1)
    exit()
if n == 1:
  print(max(0, a[1]))
  exit()
if a[1] == 0:
  if n>1:
    print(-1)
    exit()
  else:
    print(ans)
else:
  ans = max(1, a[1])
  for i in range(2, n+1):
    ans = ans*10+max(0, a[i])
print(ans)
a,b,c = input().split()
if b-a==c-b:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

a,b,c = map(int,input().split())
if b-a==c-b:
    print("YES")
else:
    print("NO")
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, k = map(int, readline().split())
    p = list(map(int, readline().split()))
    p = [x - 1 for x in p]
    c = list(map(int, readline().split()))
    ans = -INF

    for i in range(n):
        cur = i
        nx = -1
        cnt = 0
        score_dict = dict()
        score_dict[0] = 0
        score = 0
        rem = k
        while rem > 0 and nx != i:
            cnt += 1
            rem -= 1
            nx = p[cur]
            score += c[nx]
            score_dict[cnt] = score
            ans = max(ans, score)
            cur = nx

        if rem > 0 and score > 0:
            loop = (rem // cnt) - 1
            if loop > 0:
                score += score * loop
                rem -= loop * cnt
            for j in range(rem + 1):
                st = score + score_dict[j]
                ans = max(ans, st)

    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    n, k = map(int, readline().split())
    p = list(map(int, readline().split()))
    p = [x - 1 for x in p]
    c = list(map(int, readline().split()))
    ans = -INF

    for i in range(n):
        cur = i
        nx = -1
        cnt = 0
        score_dict = dict()
        score_dict[0] = 0
        score = 0
        rem = k
        while rem > 0 and nx != i:
            cnt += 1
            rem -= 1
            nx = p[cur]
            score += c[nx]
            score_dict[cnt] = score
            ans = max(ans, score)
            cur = nx

        if rem > 0 and score > 0:
            loop = (rem - 1) // cnt
            if loop > 0:
                score += score * loop
                rem -= loop * cnt
            for j in range(rem + 1):
                st = score + score_dict[j]
                ans = max(ans, st)

    print(ans)


if __name__ == '__main__':
    main()
def kaibun(s):
    for i in range(len(s)-(len(s)%2)):
        if s[i] != s[-1*i-1]:
            return False
    return True

if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
        ans = 'Yes'
    else:
        ans = 'No'
else:
    ans = 'No'

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
    if s[i] != s[-1*i-1]:
      return False
  return True

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)
N=int(input())
i=0
x=""
while(N > 26**i):
    i +=1
i -= 1
while(i!=-1):
    if(N//26**i==26):
        x += "z"
        N=N-(26**i)*26
    elif(N//26**i==1):
        x += "a"
        N=N-(26**i)
    elif(N//26**i==2):
        x += "b"
        N=N-(26**i)*2
    elif(N//26**i==3):
        x += "c"
        N=N-(26**i)*3
    elif(N//26**i==4):
        x += "d"
        N=N-(26**i)*4    
    elif(N//26**i==5):
        x += "e"
        N=N-(26**i)*5
    elif(N//26**i==6):
        x += "f"
        N=N-(26**i)*6
    elif(N//26**i==7):
        x += "g"
        N=N-(26**i)*7
    elif(N//26**i==8):
        x += "h"
        N=N-(26**i)*8
    elif(N//26**i==9):
        x += "i"
        N=N-(26**i)*9
    elif(N//26**i==10):
        x += "j"
        N=N-(26**i)*10
    elif(N//26**i==11):
        x += "k"
        N=N-(26**i)*11
    elif(N//26**i==12):
        x += "l"
        N=N-(26**i)*12
    elif(N//26**i==13):
        x += "m"
        N=N-(26**i)*13
    elif(N//26**i==14):
        x += "n"
        N=N-(26**i)*14    
    elif(N//26**i==15):
        x += "o"
        N=N-(26**i)*15
    elif(N//26**i==16):
        x += "p"
        N=N-(26**i)*16
    elif(N//26**i==17):
        x += "q"
        N=N-(26**i)*17
    elif(N//26**i==18):
        x += "r"
        N=N-(26**i)*18
    elif(N//26**i==19):
        x += "s"
        N=N-(26**i)*19
    elif(N//26**i==20):
        x += "t"
        N=N-(26**i)*20
    elif(N//26**i==21):
        x += "u"
        N=N-(26**i)*21
    elif(N//26**i==22):
        x += "v"
        N=N-(26**i)*22
    elif(N//26**i==23):
        x += "w"
        N=N-(26**i)*23
    elif(N//26**i==24):
        x += "x"
        N=N-(26**i)*24    
    elif(N//26**i==25):
        x += "y"
        N=N-(26**i)*25
    i -= 1
print(x)

### FIXED CODE ###

a=input(str())
if(a.isupper()):
    print("A")
else:
    print("a")
n = int(input())
money = 0
for _ in range(n):
  p = input().split()
  if p[1] == 'JPY':
    money += int(p[0])
  elif p[1] == 'BTC':
    money += int(p[0]) * 380000.0

print(money)

### FIXED CODE ###

n = int(input())
money = 0
for _ in range(n):
  p = input().split()
  if p[1] == 'JPY':
    money += int(p[0])
  elif p[1] == 'BTC':
    money += float(p[0]) * 380000

print(money)
a,b=map(int,input().split())
print(int(a*b))

### FIXED CODE ###

from decimal import *
getcontext().prec=18
a,b=map(Decimal,input().split())
print(int(Decimal(a)*Decimal(b)))
N,W = map(int,input().split())

w = [-1 for i in range(N)]
v = [-1 for i in range(N)]

for i in range(N):
    w[i],v[i] = map(int,input().split())
    
dp = [[0 for i in range(W+1)] for j in range(N)]

#荷物を1つだけ入れた状態で、各許容重量の最大値を初期値として持たせる
for i in range(w[0],W+1):
    dp[0][i] = v[0]

for i in range(1,N):
    for k in range(1,w[i]+1):
        dp[i][k] = dp[i-1][k]
        for j in range(w[i],W+1):
            dp[i][j] = max(dp[i][j-1],dp[i-1][j],dp[i-1][j-w[i]]+v[i])
'''
for i in range(N):
    print(dp[i])
'''

print(dp[N-1][W])


### FIXED CODE ###

from itertools import accumulate

def chk(samp):
    for i in samp:
        print(samp)

N,W = map(int,input().split())

w = [0 for i in range(N)]
v = [0 for i in range(N)]

for i in range(N):
    w[i],v[i]=map(int,input().split())



#価値毎に置き換える
wl = [[] for i in range(4)]

#価値ごとのりすとに入れていく
for i in range(N):
    wl[w[i]-w[0]].append(v[i])


#ソートして最初に0を追加する。0は選択しない場合
for i in range(4):
    wl[i].sort(reverse = 1)
    wl[i].insert(0,0)
    

#累積和を作る
for i in range(4):
    wl[i] = list(accumulate(wl[i]))
    
#出力用変数
out = 0


for i,wl0 in enumerate(wl[0]):
   for j,wl1 in enumerate(wl[1]):
       for k,wl2 in enumerate(wl[2]):
           for l,wl3 in enumerate(wl[3]):
               if i*(w[0])+j*(w[0]+1)+k*(w[0]+2)+l*(w[0]+3) > W:
                   pass
               else:
                   out = max(out,wl0+wl1+wl2+wl3)
                   
print(out)
n = int(input())
d = [int(input()) for _ in range(n)]
print(count(list(set(d))))

### FIXED CODE ###

n = int(input())
d = [int(input()) for _ in range(n)]
print(len(list(set(d))))
m=2019
l,r=map(int,input().split())

if l==0 or l%m>r%m or m*(r%m)==r:
  print(0)
  exit()

import numpy as np
si=set()
for ii in np.arange(l,r):
  si.add(ii%m)
sj=set()
for jj in np.arange(l+1,r+1):
  sj.add(jj%m)

lr=m
for ii in si:
  for jj in sj:
    t=(ii*jj)%m
    if t==0:
        print(0)
        exit()
    if t<lr:
      lr=t
      
print(lr)

### FIXED CODE ###

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

if l==0 or l//m<r//m or l%m==0:
  print(0)
  exit()

import numpy as np
lr=m
for ii in np.arange(l,r):
  for jj in np.arange(ii+1,r+1):
    t=((ii%m)*(jj%m))%m
    if t==0:
        print(0)
        exit()
    if t<lr:
      lr=t
print(lr)
Main.py
A, B, T = input()
n = (T + 0.5) // A
tot_biscuits = B * n
print(tot_biscuits)

### FIXED CODE ###

A, B, T  =  (int(_) for _ in input().split())
ans = (T + 0.5) // A
ans = int(ans * B )
print(ans)
import sys
import math
import itertools
import collections
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    R,C = NMI()
    #sy, sx = NMI()
    #gy, gx = NMI()
    board = [list(input()) for _ in range(R)]
    
    ans = 0

    #移動4方向のベクトル
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]

    #すべての点をINFで初期化
    INF = R*C*2
    distance = [[INF for _ in range(C)] for _ in range(R)]

    #地点を保存するqueを作成
    que = deque([])
    
    #スタート地点を取り出す
    for r in range(R):
        for c in range(C):
            if board[r][c] == '#':
                que.append((r,c))
                #スタート地点の距離は0
                distance[r][c] = 0

    #queが空になるまでループ
    while len(que) != 0:
        #取り出してきた状態
        pop = que.popleft()

        #移動4方向をループ
        for i in range(len(dx)):
            #移動した後の点をny,nxとする
            ny = pop[0]+dy[i]
            nx = pop[1]+dx[i]

            #nyが0以上R未満   nxが0以上C未満   まだ訪れたことがない
            if 0<= ny < R and 0 <= nx < C and　distance[ny][nx] == INF:
                #つまり移動可能でまだ行ったことがなければqueへ入れる
                que.append((ny,nx))
                #その距離をもとのpopの最短距離+1でdistanceに記録
                distance[ny][nx] = distance[pop[0]][pop[1]]+1
                if ans < distance[ny][nx]:
                    ans = distance[ny][nx]
                
    print(ans)

if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import math
import itertools
import collections
from collections import deque

sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()

NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()

def main():
    R,C = NMI()
    #sy, sx = NMI()
    #gy, gx = NMI()
    board = [list(input()) for _ in range(R)]
    
    ans = 0

    #移動4方向のベクトル
    dx = [1, 0, -1, 0]
    dy = [0, 1, 0, -1]

    #すべての点をINFで初期化
    INF = R*C*2
    distance = [[INF for _ in range(C)] for _ in range(R)]

    #地点を保存するqueを作成
    que = deque([])
    
    #スタート地点を取り出す
    for r in range(R):
        for c in range(C):
            if board[r][c] == '#':
                que.append((r,c))
                #スタート地点の距離は0
                distance[r][c] = 0

                
    cnt = 0
    
    #queが空になるまでループ
    while len(que) != 0:
        #取り出してきた状態
        pop = que.popleft()
        
        #移動4方向をループ
        for i in range(len(dx)):
            #移動した後の点をny,nxとする
            ny = pop[0]+dy[i]
            nx = pop[1]+dx[i]

            #nyが0以上R未満   nxが0以上C未満   まだ訪れたことがない
            if 0<= ny < R and 0 <= nx < C and distance[ny][nx] == INF:
                #つまり移動可能でまだ行ったことがなければqueへ入れる
                que.append((ny,nx))
                #その距離をもとのpopの最短距離+1でdistanceに記録
                distance[ny][nx] = distance[pop[0]][pop[1]]+1
                if ans < distance[ny][nx]:
                    ans = distance[ny][nx]
                
    print(ans)


if __name__ == '__main__':
    main()
s = list(input().split())
print(s[0] + s[1] + s[2])

### FIXED CODE ###

s = list( input() )
print(int(s[0]) + int(s[1]) + int(s[2]))
import sys
import math
#a = []
#for l in sys.stdin:
#    a.append(int(l))
a = int(input())
b = int(input())
h= int(input())
m = int(input())

kak1 = 0 if h == 0 else 360 / h
kak2 = 0 if m == 0 else 360/m

kaku = abs(kak1 -kak2)
result = a * a + b * b - 2 * a * b * math.cos(kaku)

### FIXED CODE ###

import sys
import math

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

kak1 = float(h * 30 + m * 0.5)
kak2 = m * 6

kaku = kak1 -kak2 if kak1 < kak2 else kak2 - kak1
result = a * a + b * b - 2 * a * b * math.cos(kaku * math.pi / 180)
print(math.sqrt(result))
n = int(input())
sp = [list(map(int, input().split())) for _ in range(n)]

d = sorted(sp, key=lambda x:(x[0],-x[1]))
for i in range(len(sp)):
    print(sp.index(d[i]))

### FIXED CODE ###

n = int(input())
sp = [list(input().split()) for _ in range(n)]
for i in range(len(sp)):
    sp[i][1] = int(sp[i][1])
d = sorted(sp, key=lambda x:(x[0],-x[1]))
for i in range(len(sp)):
    print(sp.index(d[i])+1)
N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
A=[0]+A
B=[0]+B

from itertools import accumulate

AA=list(accumulate(A))
BB=list(accumulate(B))
a,b=0,0

import bisect
for i in range(N+1):
    a=i
    b=bisect.bisect_right(BB,K-AA[i])-1
    if b==-1:
        continue
    count=max(count,a+b)
print(count)


### FIXED CODE ###

N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
A=[0]+A
B=[0]+B

from itertools import accumulate

AA=list(accumulate(A))
BB=list(accumulate(B))
count=0
a,b=0,0

import bisect
for i in range(N+1):
    a=i
    b=bisect.bisect_right(BB,K-AA[i])-1
    if b==-1:
        continue
    count=max(count,a+b)
print(count)
n, i = map(int, input())

print(n-i+1)

### FIXED CODE ###

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

print(n-i+1)
N=int(input())
if N%10==1:
  return (N-1)/10
elif N%10==2:
  return (N-2)/10
elif N%10==3:
  return (N-3)/10
elif N%10==4:
  return (N-4)/10
elif N%10==5:
  return ((N-5)/10)+1
elif N%10==6:
  return (N-6)/10
elif N%10==7:
  return ((N-7)/10)+1
elif N%10==8:
  return (N-8)/10
else:
  return (N-9)/10

### FIXED CODE ###

N=int(input())
c=N%10
if c%2==1:
  print("0")
else:
  i=1
  b=0
  while i<=100:
    b+=N//(2*(5**i))
    i+=1
  else:
    print(b)
a,b=map(int,input().split()))
if(b%(2*a)==0 or b%(4*a)==0):
    print('No')
else:
    print('Yes')

### FIXED CODE ###

a,b=map(int,input().split())
k=[]
j=a
for i in range(a+1):
    k.append(2*j)
    j=j+1
#print(k)
if(b in k):
    print('Yes')
else:
    print('No')
import sys

def main(lines):
    print(''.join(sorted(lines.split())))

next(sys.stdin)
for line in sys.stdin:
    lines += line
main(lines)


### FIXED CODE ###

import sys

def main(lines):
    print(''.join(sorted(lines.split())))

next(sys.stdin)
lines = ''
for line in sys.stdin:
    lines += line
main(lines)
def palind(word):
  word = word.lower()
  return word[::-1] ==word

num1 = int((N-1)/2)
num2 = int((N+3)/2)

text1 =S[0::num1]
text2 =S[num2-1::]

if palind(S) == True and palind(text1) == True and palind(text2) == True:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S = input()
N = len(S)

def palind(word):
  word = word.lower()
  return word[::-1] ==word

num1 = int((N-1)/2)
num2 = int((N+3)/2)

text1 =S[0::num1]
text2 =S[num2-1::]

if palind(S) == True and palind(text1) == True and palind(text2) == True:
  print("Yes")
else:
  print("No")
n,k=map(int,input().split())
a=list(map(int,input().split()))

a.sort()
#9,4,3>7
#9-(9-4-3)


#9 ;6 3 >5
if k in a:
    print("POSSIBLE")
    exit()

if k>a[-1]:
    print("IMPOSSIBLE")
    exit()

if a[0]==1:
    print("POSSIBLE")
    exit()

flag=0
for item in a[1:]:
    if item%a[0]!=0:
        flag=1

if flag==1:
    print("POSSIBLE")
    exit()
else:
    if k%item[0]==0:
        print("POSSIBLE")
        exit()
    else:
        print("IMPOSSIBLE")
        exit()




### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
import fractions
a.sort()
#9,4,3>7
#9-(9-4-3)
#9 ;6 3 >5
if k in a:
    print("POSSIBLE")
    exit()

if k>a[-1]:
    print("IMPOSSIBLE")
    exit()

if a[0]==1:
    print("POSSIBLE")
    exit()

flag=0
gg = fractions.gcd(a[0], a[1])

for item in a[1:]:
    if item%gg!=0:
        flag=1

if flag==1:
    print("POSSIBLE")
    exit()
else:
    if k%gg==0:
        print("POSSIBLE")
        exit()
    else:
        print("IMPOSSIBLE")
        exit()
input1 = input()
N = int(input1)
input2 = input()
S = str(input2)
 
R = 0
B = 0
h = 'No'
 
for i in N:
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)


### FIXED CODE ###

input1 = input()
N = int(input1)
input2 = input()
S = list(input2)
 
R = 0
B = 0
h = 'No'
 
for i in range(N):
  if S[i] == 'R':
    R += 1
  else:
    B += 1
  
if R > B:
  h = 'Yes'

print(h)
d,g=map(int,input().split())
l=[]
for i in range(n):
    l.append(list(map(int,input().split())))
op=[[0],[1]]
for i in range(d-1):
    tmp=[]
    for j in op:
        tmp.append(j+[0])
        tmp.append(j+[1])
    op=tmp
ans=10**10
for i in op:
    z=0
    k=[]
    c=0
    for j in range(d):
        if i[j]==1:
            z+=l[j][0]*100*(j+1)+l[j][1]
            c+=l[j][0]
        else:
            k.append(j)
    if z>=g:
        ans=min(ans,c)
    else:
        if len(k)>0:
            m=max(k)
            p=g-z
            cn=-(-p//((m+1)*100))
            if cn<l[m][0]:
                ans=min(ans,c+cn)
print(ans)

### FIXED CODE ###

d,g=map(int,input().split())
l=[]
for i in range(d):
    l.append(list(map(int,input().split())))
op=[[0],[1]]
for i in range(d-1):
    tmp=[]
    for j in op:
        tmp.append(j+[0])
        tmp.append(j+[1])
    op=tmp
ans=10**10
for i in op:
    z=0
    k=[]
    c=0
    for j in range(d):
        if i[j]==1:
            z+=l[j][0]*100*(j+1)+l[j][1]
            c+=l[j][0]
        else:
            k.append(j)
    if z>=g:
        ans=min(ans,c)
    else:
        if len(k)>0:
            m=max(k)
            p=g-z
            cn=-(-p//((m+1)*100))
            if cn<l[m][0]:
                ans=min(ans,c+cn)
print(ans)
a,b=map('input()','input())
c=a*b
d=2*a+2*b
print'c d'

### FIXED CODE ###

a,b = map(int, raw_input().split())
c = a*b
d = 2*(a+b)
print'%d %d'%(c,d)
a = input().split()
b = int(a[0])
c = int(a[1])
d = [int(i) for i in input().split()]
e = sorted(d)


f = int(e[0]-1)
g = int(e[-1]+1)


h = int(g-f)

X = []
for I in range(int(h+1)):
    J = int(f+I)
    if e.count(J) == 0:
        X.append(J)

Y = len(X)
H = []
for S in range(Y):
    Q = X[S]
    if Q>=b:
        g = Q-b
        H.append(g)
    else:
        g = b-Q
        H.append(g)
P = sorted(H)
F = P[0]
O = H.index(F)


print(X[O])

### FIXED CODE ###

a = input().split()
b = int(a[0])
c = int(a[1])
if c == 0:
    print(b)
    
else:
    d = [int(i) for i in input().split()]
    e = sorted(d)


    f = int(e[0]-1)
    g = int(e[-1]+1)


    h = int(g-f)

    X = []
    for I in range(int(h+1)):
        J = int(f+I)
        if e.count(J) == 0:
            X.append(J)

    Y = len(X)
    H = []
    for S in range(Y):
        Q = X[S]
        if Q>=b:
            g = Q-b
            H.append(g)
        elif Q<=b:
            g = b-Q
            H.append(g)
    
    P = sorted(H)
    F = P[0]
    O = H.index(F)


    print(X[O])
l,r=map(int,input().split())
s=range(l,r+1)[:2019]
print(min(i*j%2019for i in s for j in s if i<j

### FIXED CODE ###

# ume 20/03/18

def main():
  l,r=map(int,input().split())
  if r-l>2018:
    return 0
  else:
    c=2019
    for i in range(l,r):
      for j in range(i+1,r+1):
        c=min(c,i*j%2019)
        if c==0: return c
    return c

if __name__ == '__main__':
  print(main())
N = input()
count = 0
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 5:
    count += int(N[i]) + prev
    prev = 0
  elif 6 <= int(N[i]) + prev <= 9:
    count += 10 - (int(N[i]) + prev)
    prev = 1
  elif int(N[i]) + prev == 10:
    prev = 1
  else:
    if i < len(N) and int(N[i+1]) < 5:
      count += 5
    else:
      count += 5
      prev = 1
count = count + prev
print(count)

### FIXED CODE ###

N = input()
count = 0
prev = 0
for i in range(len(N)):
  if 0 <= int(N[i]) + prev < 5:
    count += int(N[i]) + prev
    prev = 0
  elif 6 <= int(N[i]) + prev <= 9:
    count += 10 - (int(N[i]) + prev)
    prev = 1
  elif int(N[i]) + prev == 10:
    prev = 1
  else:
    if (i < (len(N) - 1) and int(N[i+1]) < 5) or i == len(N) - 1:
      count += 5
      prev = 0
    else:
      count += 5
      prev = 1
count = count + prev
print(count)
import math

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

print(int(A * B / math.gcd(A, B)))


### FIXED CODE ###

import fractions

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

print(int(A * B / fractions.gcd(A, B)))