Harryxun/stf_run huggingface dataset:
K = int(input())
A, B = map(int,input().split())

if A//K == A//K:
  if A % K == 0:
    print("OK")
    else:
      print("NG")
else:
  print("OK")


### FIXED CODE ###

K = int(input())
A, B = map(int,input().split())
 
 
if A // K == B // K:
    if A % K ==0:
        print('OK')
    else:
        print('NG')  
else:
    print('OK')
n, x = map(int, input().split())
a = [int(i) for i in input().split()]

a.sort()
temp_x = x
for i in range(n):
  if temp_x > 0:
    temp_x += -a[i]
  else:
    ans = i
    break
print(ans)

### FIXED CODE ###

n, x = map(int, input().split())
a = [int(i) for i in input().split()]

a.sort()
temp_x = x
for i in range(n):
  temp_x += -a[i]
  if i == n-1 and temp_x > 0:
    ans = n-1
  elif temp_x > 0:
    continue
  elif temp_x == 0:
    ans = i+1
  else:
    ans = i
    break

print(ans)
A,B,C=map(input().split())
print(A[0]+B[0]+C[0])

### FIXED CODE ###

print("A"+input()[8]+"C")
N = int(input())

if N==2:
    print(3,5)
    exit()
if N==3:
    print(2,5,63)
    exit()
if N==4:
    print(2,5,20,63)
    exit()

if N==5:
    print(2,5,20,30,63)

S=set()
i=2
while len(S)<N:
    if i%2==0 or i%3==0:
        S.add(i)
    i+=1

i+=1
r=sum(S)

if r%6==0:
    pass
elif r%6==2:
    S.remove(8)
    while len(S)<N:
        if i%6==0:
            S.add(i)
            break
        i+=1
elif r%6==3:
    S.remove(9)
    while len(S)<N:
        if i%6==0:
            S.add(i)
            break
        i+=1
elif r%6==5:
    S.remove(9)
    while len(S)<N:
        if i%6==4:
            S.add(i)
            break
        i+=1

assert len(S)==N,len(S)
print(" ".join(map(str,S)))


### FIXED CODE ###

N = int(input())

if N==2:
    print(3,5)
    exit()
if N==3:
    print(2,5,63)
    exit()
if N==4:
    print(2,5,20,63)
    exit()

if N==5:
    print(2,5,20,30,63)
    exit()

S=set()
i=2
while len(S)<N:
    if i%2==0 or i%3==0:
        S.add(i)
    i+=1

i+=1
r=sum(S)

if r%6==0:
    pass
elif r%6==2:
    S.remove(8)
    while len(S)<N:
        if i%6==0:
            S.add(i)
            break
        i+=1
elif r%6==3:
    S.remove(9)
    while len(S)<N:
        if i%6==0:
            S.add(i)
            break
        i+=1
elif r%6==5:
    S.remove(9)
    while len(S)<N:
        if i%6==4:
            S.add(i)
            break
        i+=1

assert len(S)==N,len(S)
print(" ".join(map(str,S)))
#include<bits/stdc++.h>
#define rep(i, n) for (int i=0; i < n; i++)
#define repran(i, a,b) for (int i = a; i<b;i++)
#define repd(i, n) for (int i = n-1; i > -1; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
using LP = pair<ll,ll>;
using P = pair<ll,int>;
ll mod = 998244353;

int main()
{
    int n, x, y;
    cin>> n >> x>>y;
    x--;y--;
    vector<int> table(n,0);
    rep(i, n) rep(j,i){
        int tmp = min(i-j, abs(x-i)+abs(y-j)+1);
        tmp = min(tmp,abs(x-j)+abs(y-i)+1);
        table[tmp]++;
    }
    repran(i, 1, n) cout << table[i] << endl;
}

### FIXED CODE ###

N, X, Y= map(int, input().split())
K = [0]*(N-1)
for i in range(1,N):
    for j in range(i+1, N+1):
        idx = min([j-i, abs(X-i)+ abs(j-Y)+1, abs(Y-i) + 1 + abs(X-j)])-1
        K[idx] +=1
for value in K:
    print(value)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n,m,k = map(int, readline().split())
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))

sa = [0]*(n+1)
sb = [0]*(m+1)

for i in range(n):
    sa[i+1] = sa[i]+a[i]
for i in range(m):
    sb[i+1] = sb[i]+b[i]

isb=m
ans = 0
for isa in range(n+1):
    if sa[isa]>k:
        break
    while isb>0 and sa[isa]+sb[isb]>K:
        isb-=1
    ans = max(ans, isa+isb)
    
print(ans)

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n,m,k = map(int, readline().split())
a = list(map(int, readline().split()))
b = list(map(int, readline().split()))

sa = [0]*(n+1)
sb = [0]*(m+1)

for i in range(n):
    sa[i+1] = sa[i]+a[i]
for i in range(m):
    sb[i+1] = sb[i]+b[i]

isb=m
ans = 0
for isa in range(n+1):
    if sa[isa]>k:
        break
    #while isb>0 and sa[isa]+sb[isb]>k:
    while sa[isa]+sb[isb]>k:
        isb-=1
    ans = max(ans, isa+isb)
    
print(ans)
# Import
from collections import deque
import math

# I/O
def read(): return input()
def read_int(): return int(input())
def read_array(type=int): return [type(i) for i in input().split()]
def read_tupple(type=None):
    tmp = input().split()
    if type is None: return map(int, tmp)
    assert len(tmp) == len(type)
    return [type[i](tmp[i]) for i in range(len(tmp))]

MOD = 998244353
N, S = read_tupple()
A = read_array()

dp = [[0 for j in range(S+1)] for i in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(S+1):
        dp[i + 1][j] += 2 * dp[i][j]
        if j - A[i] >= 0:
            dp[i + 1][j] += dp[i][j - A[i]]
        
        while dp[i+1][j] > MOD:
			dp[i+1][j] -= MOD
        
print(dp[N][S])


### FIXED CODE ###

# Import
from collections import deque
import math

# I/O
def read(): return input()
def read_int(): return int(input())
def read_array(type=int): return [type(i) for i in input().split()]
def read_tupple(type=None):
    tmp = input().split()
    if type is None: return map(int, tmp)
    assert len(tmp) == len(type)
    return [type[i](tmp[i]) for i in range(len(tmp))]

MOD = 998244353
N, S = read_tupple()
A = read_array()

dp = [[0 for j in range(S+1)] for i in range(N+1)]
dp[0][0] = 1
for i in range(N):
    for j in range(S+1):
        dp[i + 1][j] += 2 * dp[i][j]
        if j - A[i] >= 0:
            dp[i + 1][j] += dp[i][j - A[i]]
        
        while dp[i+1][j] > MOD:
            dp[i+1][j] -= MOD
        
print(dp[N][S])
# coding: utf-8
# @????????? #?????? *?????????

import sys

def dfs(x, y, fru):
    # ???????????¨?????????.???????????????
    field[x][y] = '.'
    # 4??????????????????
    for dx in [-1,0,1]:
        nx = x + dx
        if 0 <= nx and nx < H and field[nx][y] == fru:
            dfs(nx,y,fru)

    for dy in [-1,0,1]:
        ny = y + dy
        if 0 <= ny and ny < W and field[x][ny] == fru:
            dfs(x,ny,fru)

        # for dy in range(-1,1):
        #     ny = y + dy
        #     # if 0 <= ny and ny < W and field[x][ny] == fru:
        #     if field[x][ny] == fru:
        #         dfs(x,ny,fru)

def solv(H,W):
    count = 0
    for i in range(H):
        for j in range(W):
            if field[i][j] == '@':
                dfs(i,j,'@')
                count+=1
            elif field[i][j] == '#':
                dfs(i,j,'#')
                count+=1
            elif field[i][j] == '*':
                dfs(i,j,'*')
                count+=1
    print(count)

#x,y??§2??¶?????°???1?????§??\????????????????????\???????????°?????§????????¨???
# H,W=[int(i) for i in input().split()]
# H, W = int(input()).split()
while(True):
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        sys.exit()
    field = [] # ????¨??????¨??????
    for i in range(H):
        field.append(list(input()))
    solv(H,W)

### FIXED CODE ###

# coding: utf-8
# @????????? #?????? *?????????
import sys
sys.setrecursionlimit(10000000)

def dfs(x, y, fru):
    # ???????????¨?????????.???????????????
    field[x][y] = '.'
    # 4??????????????????
    for dx in [-1,0,1]:
        nx = x + dx
        if 0 <= nx and nx < H and field[nx][y] == fru:
            dfs(nx,y,fru)
    for dy in [-1,0,1]:
        ny = y + dy
        if 0 <= ny and ny < W and field[x][ny] == fru:
            dfs(x,ny,fru)

def solv(H,W):
    count = 0
    for i in range(H):
        for j in range(W):
            if field[i][j] != '.':
                dfs(i,j,field[i][j])
                count+=1
            # elif field[i][j] == '#':
            #     dfs(i,j,'#')
            #     count+=1
            # elif field[i][j] == '*':
            #     dfs(i,j,'*')
            #     count+=1
    print(count)

f = 0
while(f == 0):
    H, W = map(int, input().split())
    if H != 0 and W != 0:
        field = [] # ????¨??????¨?????????
        for i in range(H):
            field.append(list(input()))
        solv(H,W)
    else:
        f = 1
a,b,c=int(input().split())
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
  


### FIXED CODE ###

a,b,c=map(int,input().split())
if a==b and a!=c:
  print("Yes")
elif b==c and b!=a:
  print("Yes")
elif c==a and c!=b:
  print("Yes")
else:
  print("No")
from gcd import math
K=int(input())
res=0
for i in range(1,K):
     for j in range(1,K):
            for k in range(1,K):
                res=res+gcd(gcd(i,j),k)
print(res)

### FIXED CODE ###

from math import gcd 
K=int(input())
res=0
for i in range(1,K+1):
     for j in range(1,K+1):
            for k in range(1,K+1):
                res += gcd(gcd(i,j),k)
print(res)
S = str(input())
S = S.replace(2017, 2018, 1)
print(S)


### FIXED CODE ###

S = str(input())
S = S.replace("2017", "2018", 1)
print(S)
import math
N,T = map(int,input().split())
score = math.inf
for i in range(N):
    c,t = map(int,input().split())
    if t<=T: score = min(score,c)
        
print("TLE" if score==math.inf else score)

### FIXED CODE ###

N,T = map(int,input().split())
score = 1001
for i in range(N):
    c,t = map(int,input().split())
    if t<=T: score = min(score,c)
        
print("TLE" if score==1001 else score)
num_limit = int(input())
for i in range(1,num_limit+1):
    xyz_count = 0
    j_limit = int(i ** 0.5)
    for j in range(1,j_limit+1):
        for k in range(1,j + 1):
            if i <= j**2 + j*2 +3:
                break:
            if i <= j**2 + k**2 + j*k + j + k:
                break
            for l in range(1,k+1):
                if i < j**2 + k**2 + l**2 + j*k + k*l + l*j:
                    break
                elif i == j**2 + k**2 + l**2 + j*k + k*l + l*j:
                    if j > k:
                        if k > l:
                            xyz_count += 6
                        else:
                            xyz_count += 3
                    elif k > l:
                        xyz_count += 3
                    else:
                        xyz_count += 1
    print(xyz_count)

### FIXED CODE ###

num_limit = int(input())
num_list = [0] * num_limit
j_limit = int(num_limit ** 0.5)
for j in range(1,j_limit+1):
    for k in range(1,j + 1):
        for l in range(1,k+1):
            if num_limit >= j**2 + k**2 + l**2 + j*k + k*l + l*j:
                if j > k:
                    if k > l:
                        num_list[j**2 + k**2 + l**2 + j*k + k*l + l*j-1] += 6
                    else:
                        num_list[j**2 + k**2 + l**2 + j*k + k*l + l*j-1] += 3
                elif k > l:
                    num_list[j**2 + k**2 + l**2 + j*k + k*l + l*j-1] += 3
                else:
                    num_list[j**2 + k**2 + l**2 + j*k + k*l + l*j-1] += 1
for i in num_list:
    print(i)
def gcd(a,b):
    if a==0:return b
    return gcd(b%a,a)
n = int(input())
a = list(map(int, input().split()))
#print(a)
b=[]
for i in range(n):
    #print(i)
    b.append(a[i])
for i in range(n):
    if i != 0:
        b[i]=int(b[i-1]/int(gcd(b[i-1],b[i])))*b[i]
lcm=b[n-1]
ans=0
for i in range(n):
    #print(a[i])
    ans=(ans+lcm/a[i])
M = 10**9+7
print(int(ans%M))


### FIXED CODE ###

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

N = pow(10,9)+7
def gcd(a,b):
    if a==0:return b
    return gcd(b%a,a)

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

hcm = arr[0]
for i in range(1,n):
    hcm = lcm(hcm,arr[i])

res = 0
for num in arr:
    res += (hcm//num)
    

print(res%N)
N = int(input())
src = []
for i in range(N):
    k = int(input())
    s = input()
    src.append((s,[]))
    if i == 0: continue
    src[k-1][1].append(i)

def dfs(i,depth):
    s,ch = src[i]
    print('.'*depth + s)
    for c in ch:
        dfs(c,depth+1)

dfs(0,0)

### FIXED CODE ###

import sys
sys.setrecursionlimit(1010)

N = int(input())
src = []
for i in range(N):
    k = int(input())
    s = input()
    src.append((s,[]))
    if i == 0: continue
    src[k-1][1].append(i)

def dfs(i,depth):
    s,ch = src[i]
    print('.'*depth + s)
    for c in ch:
        dfs(c,depth+1)

dfs(0,0)
N,X,T=map(int,input().split())

a=N//X

print((a+1)＊T)

### FIXED CODE ###

N,X,T = map(int,input().split())

a=N//X
if a != N/X:
    
    print((a+1)*T)
else:
    print(a*T)
a=int(input())
li = [int(input()) for i in range(a)]
li.sort()

def gcd(x,y):
  #x<=y
  if x==y:
    return x
  else:
    if y%x==0:
      return x
    else:
      return gcd(y%x,x)


def lcm(x,y):
  return x*y/gcd(x,y)

ans=li[0]
for i in range(a-1):
  if ans<=li[i+1]:
    ans=lcm(ans,li[i+1])
  else:
    ans=lcm(li[i+1],ans)

print(int(ans))

### FIXED CODE ###

a=int(input())
li = [int(input()) for i in range(a)]
li.sort()

def gcd(x,y):
  #x<=y
  if x==y:
    return x
  else:
    if y%x==0:
      return x
    else:
      return gcd(y%x,x)


def lcm(x,y):
  return x*y//gcd(x,y)

ans=li[0]
for i in range(a-1):
  if ans<=li[i+1]:
    ans=lcm(ans,li[i+1])
  else:
    ans=lcm(li[i+1],ans)

print(int(ans))
N = int(input())
ln = list(N)
print('Yes') if N%sum(ln) == 0 else print('No')


### FIXED CODE ###

N = int(input())
ln = list(str(N))
sumln = 0
for val in ln:
    sumln += int(val)

print('Yes') if N%sumln == 0 else print('No')
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
def main():
    n, *a = map(int, read().split())

    p = np.array(a)
    minp = np.minimum.accumulate(p)
    r = 0
    for i1, ae in enumerate(a):
        r += minp[i1] >= ae

    print(r)

if __name__ == '__main__':
    main()


### FIXED CODE ###

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

r = 0
x = 200001
for num in P:
  if x >= num:
    r += 1
    x = num
print(r)
# -*- coding:utf-8 -*-


H, W = int(raw_input().split())

for i in range(H):
    for j in range(W):
        row = raw_input()
        print(row)
        print(row)


### FIXED CODE ###

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


H, W = list(map(int,input().split()))

for i in range(H):
    row = input()
    print(row)
    print(row)
s = list(input())

k1 = 0
zure = 0

for i in range(len(s)-1):

    if i + zure >= len(s) - 2:
        if s[i + zure] != s[i + 1 + zure]:
            k1 += 1
        k1 += 1
        break

    if s[i + zure] == s[i+1+zure]:
        k1 += 1
        zure += 2
    else:

    k1 += 1
    if i + zure >= len(s)-1:
        if i + zure == len(s)-1:
            k1 += 1
        break

print(k1)

### FIXED CODE ###

s = list(input())

g = []

g.append(0)
g.append(1)
if len(s) > 1:
    if s[0] == s[1]:
        g.append(1)
    else:
        g.append(2)

    for i in range(3,len(s)+1):
        if s[i-1] != s[i-2]:
            g.append(g[i-1]+1)
        else:
            g.append(g[i-3]+2)

print(g[len(s)])
import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
	if c=='18':break
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*b.sort())

### FIXED CODE ###

import sys
a={}
for i in sys.stdin:
	b,c=i.split()
	a.setdefault(b, []).append(c)
for a,b in sorted(a.items(), key=lambda x: x[0]):
    print(a)
    print(*sorted(map(int,b)))
class Puzzle:
    def __init__(self,panel,space,cnt):
        self.panel=panel
        self.space=space
        self.cnt=cnt

d=(1,-1,4,-4)
model=map(str,range(8))
def check(s):
    if s==model
        return True
    return False

def bfs(s):
    m=set()
    que=[s]
    m.add(tuple(s.panel))
    while que!=[]:
        now=que[0]
        del que[0]
        if check(now.panel):
            return now.cnt
        idx1=now.space
        for i in range(4):
            idx2=idx1+d[i]
            if idx2<0 or idx2>7:
                continue
            if (idx1==3 and d[i]==1) or (idx1==4 and d[i]==-1):
                continue
            next_panel=now.panel[:]
            next_panel[idx2],next_panel[idx1]=now.panel[idx1],now.panel[idx2]
            next=Puzzle(next_panel,idx2,now.cnt+1)
            if tuple(next.panel) not in m:
                m.add(tuple(next.panel))
                que.append(next)
    return -1

while True:
    try:
        panel=raw_input().split()
    except EOFError:
        break
    space=panel.index("0")
    s=Puzzle(panel,space,0)
    ans=bfs(s)
    print ans

### FIXED CODE ###

from collections import defaultdict
d=(1,-1,4,-4)

def solve():
    que=["01234567"]
    while que!=[]:
        v=que[0]
        del que[0]
        pos=v.index("0")
        for i in range(4):
            idx2=pos+d[i]
            if idx2<0 or idx2>7:
                continue
            if (pos==3 and d[i]==1) or (pos==4 and d[i]==-1):
                continue
            u=list(v)
            u[pos],u[pos+d[i]]=u[pos+d[i]],u[pos]
            u="".join(u)
            if res[u]==0:
                que.append(u)
                res[u]=res[v]+1
res=defaultdict(int)
res["01234567"]=1
solve()
while True:
    try:
        s=raw_input().split()
    except EOFError:
        break
    s="".join(s)
    print res[s]-1
n = int(input())
li =[list(map(int,input().split())) for i in range(1,n+1)]

cnt = 0
check = []
kouho = list(range(1,n+1))
play = 0

while play < n*(n-1) // 2:
    s = play
    for i in kouho:
        if i in check or len(li[i-1]) == 0:
            continue
        temp = li[i-1][0]
        if li[temp-1][0] == i and temp not in check:
            del li[i-1][0]
            del li[temp-1][0]
            play += 1
            check.append(i)
            check.append(temp)
    cnt += 1
    kouho = check.copy()
    check = []
    
    if s == play:
        print(-1)
        exit()

print(cnt)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
 
N = int(input())
A = [[-1] + [int(x)-1 for x in row.split()][::-1] for row in sys.stdin.readlines()]
 
A.append([-1])

def f(cand):
    cand1 = set()
    can_use = []
    for n in cand:
        if A[A[n][-1]][-1] == n:
            can_use.append(n)
    for n in can_use:
        A[n].pop()
        cand1.add(n)
        if A[n][-1] != -1:
            cand1.add(A[n][-1])
    return len(can_use), cand1
    
answer = 0
rest = N*(N-1)
cand = set(range(N))
while True:
    answer += 1
    x,cand = f(cand)
    if x == 0:
        answer = -1
        break
    rest -= x
    if rest == 0:
        break
    
print(answer)
import numpy

while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
        s1 = (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1)
        s2 = (x3-x2)*(yp-y2) - (y3-y2)*(xp-x2)
        s3 = (x1-x3)*(yp-y3) - (y1-y3)*(xp-x3)
        if numpy.sign(s1) == numpy.sign(s2) and numpy.sign(s1) == numpy.sign(s3):
            print("YES")
        else:
            print("NO")
    except:
        break



### FIXED CODE ###

import math

while True:
    try:
        x1, y1, x2, y2, x3, y3, xp, yp = map(float, input().split())
        s1 = (x2-x1)*(yp-y1) - (y2-y1)*(xp-x1)
        s2 = (x3-x2)*(yp-y2) - (y3-y2)*(xp-x2)
        s3 = (x1-x3)*(yp-y3) - (y1-y3)*(xp-x3)
        if math.copysign(1, s1) == math.copysign(1, s2) and math.copysign(1, s1) == math.copysign(1, s3):
            print("YES")
        else:
            print("NO")
    except:
        break
from collections import deque
def main():
  n,m=map(int,input().split())
  e=[[]for _ in range(n)]
  for _ in range(m):
    a,b=map(int,input().split())
    a-=1
    b-=1
    e[a].appned(b)
    e[b].append(a)
  ans=[-1]*n
  dq=deque([0])
  while dq:
    g=dq.popleft()
    for v in e[g]:
      if ans[v]==-1:
        ans[v]=g+1
        dq.append(v)
  print(*ans[1:])
main()  

### FIXED CODE ###

def LI():return list(map(int,input().split()))
def yes():print("Yes")
def no():print("No")
from collections import deque

def main():
    n,m=LI()
    edge=[[] for i in range(n)]
    for i in range(m):
        a,b=LI()
        a-=1;b-=1
        edge[a].append(b)
        edge[b].append(a)    
    ans=[-1]*(n)
    goal=deque([0])
    while goal:
        g=goal.popleft()
        for i in edge[g]:
            if ans[i]==-1:
                ans[i]=g+1
                goal.append(i)
    yes()
    print(*ans[1:])
main()
N = int(input())

d = {}

x, y, h = map(int, input().split())
count = 0

while True:
  if(h == 0):
    x, y, h = map(int, input().split())
    count+= 1
    continue
  else:
    for i in range(101):
      for j in range(101):
        d[(i, j)] = abs(i- x)+ abs(j- y)+ h
    count+= 1
    break

for k in range(N- count):
  x, y, h = map(int, input().split())
  if(h == 0):
    for i in range(101):
      for j in range(101):
        if(d[(i, j)]- abs(i- x)- abs(j- y)> 0):
          del d[(i, j)]
  else:
    for i in range(101):
      for j in range(101):
        if((i, j) in d):
          if(d[(i, j)] != abs(i- x)+ abs(j- y)+ h):
            del d[(i, j)]

if(len(d) == 1):            
  zahyou, height = list(d.items())[0]
else:  
  zahyou, height = list(d.items())[10]
  
print("{0[0]} {0[1]} {1}".format(zahyou, height))

### FIXED CODE ###

N = int(input())

d = {}
l = []
p = 0

for i in range(N):
  l.append(list(map(int, input().split())))

while True:
  if(l[0][2] == 0):
    l.append(l[0])
    del l[0]
  else:
    x, y, h= l[0]
    for i in range(101):
      for j in range(101):
        d[(i, j)] = abs(i- x)+ abs(j- y)+ h
    break

for k in range(N- 1):
  x, y, h = l[k+ 1]
  if(h == 0):
    for i in range(101):
      for j in range(101):
        if((i, j) in d):
          if(d[(i, j)]- abs(i- x)- abs(j- y)> 0):
            del d[(i, j)]
  else:
    for i in range(101):
      for j in range(101):
        if((i, j) in d):
          if(d[(i, j)] != abs(i- x)+ abs(j- y)+ h):
            del d[(i, j)]

zahyou, height = list(d.items())[0]
  
print("{0[0]} {0[1]} {1}".format(zahyou, height))
red, green, blue = map(int, input().split())
k = int(input())
success = 0
for cnt in range(k+1):
    if red >= green:
        green *= 2
    elif red >= blue:
        blue *= 2
    elif green >= blue:
        blue *= 2
    else:
        success = 1
        break
if success == 1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

x = int(input())
cnt = 6
while True:
    if x < cnt*100:
        break
    cnt += 2
print(int(11 - cnt / 2))
from collections import Counter
n=int(input())
v=list(map(int,input().split()))
a=Counter(v[::2]).most_common() #(数字,何回出現)が出現回数が大きい方から
b=Counter(v[1::2]).most_common()
if len(a)==1:
    a.append([0,0])
if len(b)==1:
    b.append([0,0])
if a[0][0]==b[0][0]:
    print(min(n-a[1,1]-b[0,1],n-a[0,1]-b[1,1]))
else:
    print(n-a[0,1]-b[0,1])


### FIXED CODE ###

from collections import Counter
n=int(input())
v=list(map(int,input().split()))
a=Counter(v[::2]).most_common() #(数字,何回出現)が出現回数が大きい方から
b=Counter(v[1::2]).most_common()
if len(a)==1:
    a.append([0,0])
if len(b)==1:
    b.append([0,0])
if a[0][0]==b[0][0]:
    print(min(n-a[1][1]-b[0][1],n-a[0][1]-b[1][1]))
else:
    print(n-a[0][1]-b[0][1])
n=int(input())
num=math.log(n,10)
if 0<=num<1:
  print(n)
elif 1<=num<2:
  print(n-90)
elif 2<=num<3:
  print(909)
elif 3<=num<4:
  print(909)
elif 4<=num<5:
  print(n-9090)
else:
  print(90909)

### FIXED CODE ###

n=int(input())
ans=0
for i in range(1,n+1):
  if len(str(i))%2!=0:
    ans+=1
print(ans)
s = input()

slist = s.split(' ')

left = slist[0] + slist[1]

right = slist[2] + slist[3]

if left > right:
	print('left')
else if left == right:
	print('Balanced')
else:
	print('right')

### FIXED CODE ###

s = input()

slist = s.split(" ")

left = int(slist[0]) + int(slist[1])

right = int(slist[2]) + int(slist[3])

if left > right:
	print("Left")
	
elif left == right:
	print("Balanced")
	
else:
	print("Right")