Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = [-1 for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != -1 and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != -1:
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
if ans[0] == "0":
    print(-1)
else:
    print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
sc_list = []
for i in range(M):
    s, c = map(int, input().split())
    sc_list.append([s,c])
ans = ""
flag = 0
num_slot = ["X" for i in range(N)]
for lists in sc_list:
    if num_slot[lists[0]-1] != "X" and num_slot[lists[0]-1] != lists[1]:
        print(-1)
        flag = 1
        break
    else:
        num_slot[lists[0]-1] = lists[1]
if flag == 0:
    for i in range(N):
        if num_slot[i] != "X":
            ans += str(num_slot[i])
        else:
            if i == 0:
                ans += "1"
            else:
                ans += "0"
    if ans[0] == "0" and ans != "0":
        print(-1)
    elif N == 1 and M == 0:
        print(0)
    else:
        print(int(ans))
import sys
n,y=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
      if i*10000+j*5000+(n-i-j)*1000==y:
        print(i j n-i-j)
        sys.exit()
print(-1 -1 -1)
    


### FIXED CODE ###

import sys
n,y=map(int,input().split())
for i in range(n+1):
  for j in range(n-i+1):
      if i*10000+j*5000+(n-i-j)*1000==y:
        print(*[i,j,n-i-j])
        sys.exit()
print(*[-1,-1,-1])
# 初期入力
r = int(input())
#mennseki_r =3.14*r*r
#mennseki_1 =3.14*1*1

#kotae =int(mennseki_r / mennseki_1)
print(kotae=r*r)

### FIXED CODE ###

# 初期入力
r = int(input())
#mennseki_r =3.14*r*r
#mennseki_1 =3.14*1*1

#kotae =int(mennseki_r / mennseki_1)
kotae=r*r
print(kotae)
m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if (mi != m2):
    print("1")
else:
    print("0")

### FIXED CODE ###

m1, d1 = map(int, input().split())
m2, d2 = map(int, input().split())

if (m1 != m2):
    print("1")
else:
    print("0")
# -*- coding: utf-8 -*-
"""
D - Various Sushi
https://atcoder.jp/contests/abc116/tasks/abc116_d

"""
import sys

from collections import Counter

def solve(N, K, sushi):
    sushi.sort(key=lambda x: x[1], reverse=True)
    pick = sushi[:K]
    pick_type = set([t for t, d in pick])

    cnt = Counter()
    for t, d in pick:
        cnt[t] += 1

    rem = dict()
    for t, d in sushi:
        if t not in pick_type:
            rem[t] = max(rem.get(t, 0), d)

    res = sorted([[k, v] for k, v in rem.items()], key=lambda x: x[1])

    manzoku = sum([d for t, d in pick])
    ans = [manzoku + len(pick_type)**2]
    while res:
        t, d = res.pop()
        pick_type.add(t)
        tt, dd = pick.pop()
        if cnt[tt] > 1:
            cnt[tt] -= 1
            manzoku = manzoku - dd + d
            ans.append(manzoku+ len(pick_type)**2)
    return max(ans)


def main(args):
    N, K = map(int, input().split())
    sushi = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, K, sushi)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])


### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
D - Various Sushi
https://atcoder.jp/contests/abc116/tasks/abc116_d

"""
import sys

from collections import Counter

def solve(N, K, sushi):
    sushi.sort(key=lambda x: x[1], reverse=True)
    pick = sushi[:K]            #  おいしさポイントの高い方からK個の寿司を選択
    pick_type = set([t for t, d in pick]) # 選択済の種類

    cnt = Counter()             #  各種類の寿司が何個ずつあるか覚えておく
    for t, d in pick:
        cnt[t] += 1

    rem = dict()                #  未選択の種類の寿司のうち、一番おいしさポイントが高い物
    for t, d in sushi:
        if t not in pick_type:
            rem[t] = max(rem.get(t, 0), d)
    res = sorted([[k, v] for k, v in rem.items()], key=lambda x: x[1]) # おいしさで昇順にソート(一番おいしい物が末尾)

    manzoku = sum([d for t, d in pick])
    ans = [manzoku + len(pick_type)**2] #  現在の選択でのスコア、ここから種類を1つずつ増加させていきスコアを計算する
    while len(pick_type) < K and pick and res:
        t, d = res.pop()
        pick_type.add(t)
        tt, dd = pick.pop()
        while cnt[tt] == 1 and pick:
            tt, dd = pick.pop()
        if cnt[tt] > 1:
            cnt[tt] -= 1
            manzoku = manzoku - dd + d
            ans.append(manzoku+ len(pick_type)**2)
    return max(ans)


def main(args):
    N, K = map(int, input().split())
    sushi = [[int(i) for i in input().split()] for _ in range(N)]
    ans = solve(N, K, sushi)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])
import sys
MOD = 10**9 + 7
n, m = map(int, input().split())
a = [int(x) for x in sys.stdin.readlines()]
ans = [0 for i in range(n)]
if 1 not in a:
    ans[0] = 1
if 2 not in a:
    ans[1] = ans[0] + 1

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

print(ans[-1])

### FIXED CODE ###

import sys
MOD = 10**9 + 7
n, m = map(int, input().split())
a = [int(x) for x in sys.stdin.readlines()]
ans = [1 for i in range(n)]
for x in a:
    ans[x-1] = 0
for i in range(n):
    if i == 0 and ans[i] == 0:
        ans[0] = 0
    elif i == 1:
        if ans[i] == 1:
            ans[1] += ans[0]
        elif ans[i] == 0:
            ans[1] = 0
    elif i >= 2 and ans[i] == 1:
        ans[i] = (ans[i-1] + ans[i-2])%MOD

print(ans[-1])
N,T=map(int,input().split())
res=2000
for i in N:
  c,t=map(int,input().split())
  if t>T:
    continue
  else:
    res=min(res,c)
if res=2000:
  print("TLE")
else:
  print(res)

### FIXED CODE ###

N,T=map(int,input().split())
res=2000
for i in range(N):
  c,t=map(int,input().split())
  if t>T:
    continue
  else:
    res=min(res,c)
if res==2000:
  print("TLE")
else:
  print(res)
import sys
import os

f = open("C:/Users/user/Documents/atCoderProblem/import.txt","r")
sys.stdin = f

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

n = input()

print("ABC" + n)


### FIXED CODE ###

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

n = input()

print("ABC" + n)
from collections import deque
#入力
h,w = map(int, input().split())
w = w + 2
maze = [list('#' * (w))]
for i in range(h):
    maze.append(list('#' + input() + '#')) #迷路の読み込み
maze.append(list('#' * (w)))
h = h + 2
                
distance = [[float('inf')] * w for i in range(h)] #まずは無限大の距離と仮定

que = deque() #座標と距離を保存
que.append((1,1,0)) #スタートの座標と距離を入力

while que:
    i,j,k = que.popleft() #先頭を取得
    for di,dj in move:
        if maze[i+di][j+dj] == '.' and distance[i+di][j+dj] > k+1:
            #迷路の道で，今までの距離が今出した距離より長いなら
            distance[i+di][j+dj] = k+1 #より短い今の距離に更新し
            que.append((i+di,j+dj,k+1)) #queの末尾に追加

minimum_distance = distance[h-2][w-2]

#初期の道のカウント
road = 0
for i in range(h):
    for j in range(w):
        if maze[i][j] == '.':
            road = road + 1

print(road - minimum_distance - 1)

### FIXED CODE ###

from collections import deque
#入力
h,w = map(int, input().split())
w = w + 2
maze = [list('#' * (w))]
for i in range(h):
    maze.append(list('#' + input() + '#')) #迷路の読み込み
maze.append(list('#' * (w)))
h = h + 2
                
distance = [[float('inf')] * w for i in range(h)] #まずは無限大の距離と仮定

que = deque() #座標と距離を保存
que.append((1,1,0)) #スタートの座標と距離を入力

move = [(1,0),(-1,0),(0,1),(0,-1)]

while que:
    i,j,k = que.popleft() #先頭を取得
    for di,dj in move:
        if maze[i+di][j+dj] == '.' and distance[i+di][j+dj] > k+1:
            #迷路の道で，今までの距離が今出した距離より長いなら
            distance[i+di][j+dj] = k+1 #より短い今の距離に更新し
            que.append((i+di,j+dj,k+1)) #queの末尾に追加

#初期の道のカウント
road = 0
for i in range(h):
    for j in range(w):
        if maze[i][j] == '.':
            road = road + 1

if distance[h-2][w-2] != float('inf'):
    minimum_distance = distance[h-2][w-2]
else:
    minimum_distance = road

print(road - minimum_distance - 1)
n = int(input())

s = n
b = []
while n:
    b.append(n%10)
    n = n // 10

if s % sum(b) == 0:
    print("Yes")
else:

### FIXED CODE ###

n = int(input())

s = n
b = []
while n:
    b.append(n%10)
    n = n // 10

if s % sum(b) == 0:
    print("Yes")
else:
    print("No")
N = int(input())
A = int(input())
B = int(input())
price =N * A
if  price > B:
  print(B)
else:
  print(price)

### FIXED CODE ###

price =input().split()
if int(price[0]) *  int(price[1]) > int(price[2]) :
	print(int(price[2]))
else :
	print(int(price[0]) * int(price[1]))
s = input()
st = []
for e in s:
  if e == B and len(st) != 0:
    st.pop()
  else:
    st.append(int(e))
print(''.join(map(str,st)))

### FIXED CODE ###

s = input()
st = []
for e in s:
  if e == 'B':
    if len(st) != 0:
      st.pop()
  else:
    st.append(int(e))
print(''.join(map(str,st)))
def sum_each_num(n):
    sum = 0
    while n > 0:
        sum += n % 10
        n = n // 10
    return sum

def main():
    n = input()
    sum = sum_each_num(n)
    if n % 9 == 0:
        print("Yes")
    else:
        print("No")

if __name__ == '__main__':
    main()


### FIXED CODE ###

n = int(input())
if n % 9 == 0:
    print("Yes")
else:
    print("No")
a,b,op = input().split()
a = int(a)
b = int(b)
if op == '+':
  print(a+b)
else:
  print(a-b)

### FIXED CODE ###

l = list(input().split())
if l[1] == "+":
  print(int(l[0])+int(l[2]))
else:
  print(int(l[0])-int(l[2]))
n = input()

a = map(int, raw_input().split())
a.sort(reverse = True)
tmp = [0]
ct = 0

key = a.pop(0)
while len(a) != 1:
    nxt = a.pop(0)
    if key == nxt:
        tmp.append(key)
	ct += 1
        if ct == 2:
            break
    key = a.pop(0)

if len(tmp) < 2:
    print 0
else:
    print tmp[1] * tmp[2]

### FIXED CODE ###

n = int(input())
tmp = raw_input()

As = [int(a) for a in tmp.split()]

dic = {}
maxes = [0, 0]
for a in As:
    if a not in dic:
        dic[a] = 0
    dic[a] += 1
    if dic[a] % 2 == 0:
        if maxes[0] < a:
            maxes[0], maxes[1] = a, maxes[0]
        elif maxes[1] < a:
                maxes[1] = a

print (maxes[0] * maxes[1])
N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'a':1, 'b':2, 'c':3, 'd':4, 'e':5, 'f':6, 'g':7, 'h':8, 'i':9, 'j':10, 'k':11, 'l':12, 'm':13,
            'n':14, 'o':15, 'p':16, 'q':17, 'r':18, 's':19, 't':20, 'u':21, 'v':22, 'w':23, 'x':24, 'y':25, 'z':26}

number_alphabet = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h', 9:'i', 10:'j', 11:'k', 12:'l', 13:'m',
                   14:'n', 15:'o', 16:'p', 17:'q', 18:'r', 19:'s', 20:'t', 21:'u', 22:'v', 23:'w', 24:'x', 25:'y', 26:'z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))

### FIXED CODE ###


N = int(input())
S = input()
list_S = list(S)
list_ans = []

alphabet_number = {'A':1, 'B':2, 'C':3, 'D':4, 'E':5, 'F':6, 'G':7, 'H':8, 'I':9, 'J':10, 'K':11, 'L':12, 'M':13,
            'N':14, 'O':15, 'P':16, 'Q':17, 'R':18, 'S':19, 'T':20, 'U':21, 'V':22, 'W':23, 'X':24, 'Y':25, 'Z':26}

number_alphabet = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H', 9:'I', 10:'J', 11:'K', 12:'L', 13:'M',
                   14:'N', 15:'O', 16:'P', 17:'Q', 18:'R', 19:'S', 20:'T', 21:'U', 22:'V', 23:'W', 24:'X', 25:'Y', 26:'Z'}

for i in range(len(list_S)):
    A = alphabet_number[list_S[i]]
    
    if A + N <= 26:
        B = A + N
    else:
        B = (A+N) - 26
        
    C = number_alphabet[B]
    list_ans.append(C)

print(''.join(list_ans))
Imp = int(raw_input())
A = Imp[0]
B = Imp[1]
re = 0
if A % 3 == 0:    
    re = 1
if B % 3 == 0:
    re = 1
if (A+B) % 3 == 0:
        re = 1
        
if re ==1:
    print("Possible")
else:
    print("Impossible")

### FIXED CODE ###

Imp = list(map(int, input().split()))
A = Imp[0]
B = Imp[1]
re = 0
if A % 3 == 0:    
    re = 1
if B % 3 == 0:
    re = 1
if (A+B) % 3 == 0:
        re = 1
        
if re ==1:
    print("Possible")
else:
    print("Impossible")
s=len(input())
print(x*s)

### FIXED CODE ###

s=len(input())
print('x'*s)
a,b,k=map(int,input().split())
for i in range(k):
  if(a>0):
    a-=1
  elif(b>0):
    b-=1
  else:
    pass
print("{} {}".format(a,b))

### FIXED CODE ###

s=input().split()
print("{}{}".format(s[1],s[0]))
n,m = map(int,input().split())
s = str(input())
t = str(input())
if n > m:
    bigg = n
    summoo = m
def get_gcd(a, b):
    if a < b:
        a, b = b, a
    if a % b == 0:
        return b
    else:
        return get_gcd(b, a % b)
def get_lcm(a, b, gcd):
    lcm = a * b // gcd
    return lcm
saisyou = get_lcm(n,m,get_gcd(n,m))
unti = max(saisyou,n,m)
ans = 0
if bigg%summoo != 0:
    for l in range(unti,100000,saisyou):
        num = 0
        for i in range(min(n,m)):
            if 1+(l/n)*i+1 == 1+(l/m)*i+1:
                if s[i] == t[i]:
                    pass
                else:
                    num += 1
                    break
        if num == 0:
            ans = l
            break
    print(ans)
else:
    print(-1)

### FIXED CODE ###

n,m = map(int,input().split())
s = str(input())
t = str(input())
def get_gcd(a, b): #最大公約数を求める関数
    if a < b:
        a, b = b, a
    if a % b == 0:
        return b
    else:
        return get_gcd(b, a % b)
def get_lcm(a, b, gcd): #みたまんまそういうやつです
    lcm = a * b // gcd
    return lcm
lcm = get_lcm(n,m,get_gcd(n,m)) #lcmはn,m最小公倍数
lcm2 = get_lcm(lcm/n,lcm/m,get_gcd(lcm/n,lcm/m)) #lcm２はlcm/nとlcm/mの最小公倍数
ans = 0
for i in range(int(lcm//lcm2)):
    if s[int(i*lcm2//(lcm/n))] == t[int(i*lcm2//(lcm/m))]:
        pass
    else:
        ans = 1
        break
if ans == 1:
    print(-1)
else:
    print(lcm)
n,m = map(int,input().split())
a,B,ans = [[] for _ in range(n)],[],0
def solve(v,a,b):
    visited[v] = True
    for n in a[v]:
        if not visited[n] and set([v,n]) != set([a,b]):
            solve(n,a,b)

for i in range(m):
    a,b = map(int,input().split())
    a[a-1].append(b-1)
    a[b-1].append(a-1)
    B.append((a-1,b-1))

for i in range(m):
    visited = [True]+[False]*(n-1)
    a,b = B[i]
    solve(0,a,b)
    if visited != [True]*n:
        ans += 1

print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
a,b,ans = [[] for _ in range(n)],[],0
def solve(v,aa,bb):
    visited[v] = True
    for n in a[v]:
        if not visited[n] and set([v,n]) != set([aa,bb]):
            solve(n,aa,bb)

for i in range(m):
    x,y = map(int,input().split())
    a[x-1].append(y-1)
    a[y-1].append(x-1)
    b.append((x-1,y-1))

for i in range(m):
    visited = [True]+[False]*(n-1)
    x,y = b[i]
    solve(0,x,y)
    if visited != [True]*n:
        ans += 1

print(ans)
def checkFunction(c):
    
    if not ('WR' in c):
        return 0
    while c[0] == 'R':
        c = c[1:]
    while c[-1] == 'W':
        c = c[:-1]

    if c.index('R') + 1 != len(c):
        c2 = c.replace('WR', 'RR',1)[:-1]
        return checkFunction(c2) + 1
    return 1


N = int(input())
c= input()

print(checkFunction(c))


### FIXED CODE ###


def check(N, c):
    RinRight = c.count('R')
    WinLeft = 0
    r = RinRight
    for i in range(N):
        if c[i] == 'R':
            RinRight -= 1
        else: # c[i] == 'W'
            WinLeft +=1
        r = min(r, max(RinRight,WinLeft))

    return r


N = int(input())
c= input()
print(check(N,c))
primes = [2,3,5,7,11,13,17,19,23,29,31]

memo1 = {}
def factorization(n):
    result = []
    for prime in primes:
        while n % prime == 0:
            n = n / prime
            result.append(prime)
    if n != 1:
        result.append(n)
    return result

def num_of_factors(l):

    if len(l) == 1:
        return 2
    p2num = {}
    for prime in l:
        if prime not in p2num:
            p2num[prime] = 2
        else:
            p2num[prime] += 1
    return reduce(lambda x,y: x * y,p2num.values())

def factors_of_factorials(n):
    l = []
    for i in range(1,n+1):
        l += factorization(i)
    return num_of_factors(l) % (10**9 + 7)


n = int(raw_input())
print factors_of_factorials(n)

### FIXED CODE ###

primes = [2,3,5,7,11,13,17,19,23,29,31]

memo1 = {}
def factorization(n):
    result = []
    for prime in primes:
        while n % prime == 0:
            n = n / prime
            result.append(prime)
    if n != 1:
        result.append(n)
    return result

def num_of_factors(l):
    if l == []:
        return 1
    if len(l) == 1:
        return 2
    p2num = {}
    for prime in l:
        if prime not in p2num:
            p2num[prime] = 2
        else:
            p2num[prime] += 1
    return reduce(lambda x,y: x * y,p2num.values())

def factors_of_factorials(n):
    l = []
    for i in range(1,n+1):
        l += factorization(i)
    return num_of_factors(l) % (10**9 + 7)


n = int(raw_input())
print factors_of_factorials(n)
H,W=map(int,input().split())
S=[input() for i in [0]*H]
M=[[-1]*W for _ in [0]*H]
def dfs(i,j,k):
    M[i][j]=k
    s=S[i][j]
    if i+1<H and M[i+1][j]==-1 and s!=S[i+1][j]:
        dfs(i+1,j,k)
    if i-1>=0 and M[i-1][j]==-1 and s!=S[i-1][j]:
        dfs(i-1,j,k)
    if j+1<W and M[i][j+1]==-1 and s!=S[i][j+1]:
        dfs(i,j+1,k)
    if j-1>=0 and M[i][j-1]==-1 and s!=S[i][j-1]:
        dfs(i,j-1,k)
k=0
for i in range(H):
    for j in range(W):
        if M[i][j]==-1:dfs(i,j,k);k+=1
ds={}# #
dd={}# .
#di=set()
for i in range(H):
    for j in range(W):
        m=M[i][j]
        if S[i][j]=='#':ds[m]=ds.get(m,0)+1
        else:dd[m]=dd.get(m,0)+1
        #di|={m}
r=0
for i in range(k):
    r += ds.get(i,0)*dd.get(i,0)
print(r)

### FIXED CODE ###

import collections
H,W=map(int,input().split())
S=[input() for i in [0]*H]
M=[[-1]*W for _ in [0]*H]
k=0
for y in range(H):
    for x in range(W):
        if M[y][x]!=-1:continue #visited
        M[y][x]=k
        Q=collections.deque()
        Q.append((y,x))
        while len(Q)>0:
            i,j=Q.popleft()
            s=S[i][j]
            if i+1<H and M[i+1][j]==-1 and s!=S[i+1][j]:
                M[i+1][j]=k
                Q.append((i+1,j))
            if i-1>=0 and M[i-1][j]==-1 and s!=S[i-1][j]:
                M[i-1][j]=k
                Q.append((i-1,j))
            if j+1<W and M[i][j+1]==-1 and s!=S[i][j+1]:
                M[i][j+1]=k
                Q.append((i,j+1))
            if j-1>=0 and M[i][j-1]==-1 and s!=S[i][j-1]:
                M[i][j-1]=k
                Q.append((i,j-1))
            #print(k,M,Q)
        k+=1
ds={}
dd={}
for i in range(H):
    for j in range(W):
        m=M[i][j]
        if S[i][j]=='#':ds[m]=ds.get(m,0)+1
        else:dd[m]=dd.get(m,0)+1
r=0
for i in range(k):
    r += ds.get(i,0)*dd.get(i,0)
print(r)
a = int (input())
b = int (input())

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')

### FIXED CODE ###

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

if a*b % 2 == 0:
    print('Even')
else:
    print('Odd')
k,s=map(int,input().split())
print(len([z for x in range(k+1) for y in range(k+1) if 0<=s-x-y<=k]))

### FIXED CODE ###

k,s=map(int,input().split())
print(len([1 for z in range(k+1) for y in range(k+1) if 0<=s-y-z<=k]))
from math import pi

r = int(input())
print("{:.10f} {:.10f}".format(pi*(r**2), 2*pi*r))

### FIXED CODE ###

from math import pi

r = float(input())
print("{:.10f} {:.10f}".format(pi*(r**2), 2*pi*r))
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: float):
    s = B[0] * 100
    x = int(B[2:])
    #ret = (B * 100 * A) // 100
    ret = ((s + x) * A) // 100
    print(int(ret))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = str(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: float):
    s = int(B[0]) * 100
    x = int(B[2:])
    #ret = (B * 100 * A) // 100
    ret = ((s + x) * A) // 100
    print(int(ret))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = str(next(tokens))  # type: float
    solve(A, B)

if __name__ == '__main__':
    main()
A=input().split()
#array = [int(input()) for i in range(int(A))]
x = []
print(x[1])
print(A)
target ="DENIED"
for i in x:
  if x.index[i]%2 == 0:
    if x.index[i]%3 == 0 or x.index[i]%5 == 0:
      target = "APPROVED"
      break
print(target)


### FIXED CODE ###

A=input().split()
x = input().split()
target ="APPROVED"
for i in x:
  if int(i)%2 == 0:
    if int(i)%3 > 0 and int(i)%5 > 0:
      target = "DENIED"
      break
print(target)
# a:高橋 体力
# b:高橋 攻撃力
# c:青木　体力
# d:青木　攻撃力

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

while c > 0:
  c = c-b　#青木体力
  if c <= 0:
    print("Yes")
  a = a-d
  if a <= 0:
    print("No")
  

### FIXED CODE ###

def main():

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

    while c > 0:
        c = c - b
        if c <= 0:
            print("Yes")
            return
        a = a - d
        if a <= 0:
            print("No")
            return

if __name__ == '__main__':
    main()
N=int(input())
a=list(map(int, input().split()))
a.sort()[::-1]
Alice=0
Bob=0
for i in range(N):
  if i%2==0:
    Alice += a[i]
  else:
    Bob += a[i]
print(Alice-Bob)


### FIXED CODE ###

N=int(input())
a=list(map(int, input().split()))
a.sort(reverse=True)
Alice=0
Bob=0
for i in range(N):
  if i%2==0:
    Alice += a[i]
  else:
    Bob += a[i]
print(Alice-Bob)
s = list(input())

for i in s:
    sum += int(i)

print(sum)


### FIXED CODE ###

s = list(input())
ball = 0
for i in s:
    ball = ball + int(i)

print(ball)
N = int(input())
A = [int(x) for x in input().split()]

d = dict()
for i in range(N):
    d[A[i]] = d.get(A[i], 0) + 1

if len(d) > 3:
    print('No')

else:
    k = list(d.keys())
    v = list(d.values())
    
    # a1 ^ a2 ^ a3 = 0 and an: N/3
    if len(d) == 3 and k[0]^k[1]^k[2] == 0 and v[0]==v[1]==v[2]:
        print('Yes')
    
    # a1: 2N/3, 0: N/3
    elif len(d) == 2 and (k[0] == 0 and v[1] == 2*v[0]) or (k[1] == 0 and v[0] == 2*v[1]):
        print('Yes')
    
    # 0: N
    elif len(d) == 1 and k[0] == 0:
        print('Yes')
    
    else:
        print('No')


### FIXED CODE ###

from collections import Counter

N = int(input())
A = [int(x) for x in input().split()]

d = Counter(A)

if len(d) > 3:
    print('No')

else:
    k = list(d.keys())
    v = list(d.values())
    
    # a1 ^ a2 ^ a3 = 0 and an: N/3
    if len(d) == 3 and k[0]^k[1]^k[2] == 0 and v[0]==v[1]==v[2]:
        print('Yes')
    
    # a1: 2N/3, 0: N/3
    elif len(d) == 2 and ((k[0] == 0 and v[1] == 2*v[0]) or (k[1] == 0 and v[0] == 2*v[1])):
        print('Yes')
    
    # 0: N
    elif len(d) == 1 and k[0] == 0:
        print('Yes')
    
    else:
        print('No')
n=int(input())
a=list(map(int,input().split()))
b=[0 for _ in range(n)]
for i in range(n):
  b[a[i]-1] = i+1
print(''.join(b))

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=[0 for _ in range(n)]
for i in range(n):
  b[a[i]-1] = i+1
for j in range(n):
  print(b[j])
a,b,c = map(int, input())
A = b/a
if A<c:
  ans = A
else:
  ans = c
print(ans)

### FIXED CODE ###

a,b,c = map(int, input().split())
A = int(b/a)
if A<c:
  ans = A
else:
  ans = c
print(ans)