Harryxun/stf_run huggingface dataset:
from collections import deque

class Combination:
    def __init__(self, size, mod=10**9 + 7):
        self.size = size + 2
        self.mod = mod
        self.fact = [1, 1] + [0] * size
        self.factInv = [1, 1] + [0] * size
        self.inv = [0, 1] + [0] * size

        for i in range(2, self.size):
            self.fact[i] = self.fact[i - 1] * i % self.mod
            self.inv[i] = -self.inv[self.mod % i] * (self.mod // i) % self.mod
            self.factInv[i] = self.factInv[i - 1] * self.inv[i] % self.mod

    def npr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * self.factInv[n - r] % self.mod

    def ncr(self, n, r):
        if n < r or n < 0 or r < 0:
            return 0
        return self.fact[n] * (self.factInv[r] * self.factInv[n - r] % self.mod) % self.mod

    def factN(self, n):
        if n < 0:
            return 0
        return self.fact[n]

N, K = map(int, input().split())
MOD = 10**9 + 7
edges = [[] for _ in range(N)]

for _ in range(N - 1):
    fr, to = map(int, input().split())
    fr -= 1
    to -= 1
    edges[fr].append(to)
    edges[to].append(fr)

comb = Combination(N + 100)

chCnt = [0] * N
que = deque([(0, -1)])
while que:
    now, pr = que.popleft()
    chCnt[now] = len(edges[now]) - 1
    for to in edges[now]:
        if to != pr:
            que.append((to, now))
chCnt[0] += 1

ans = K
que = deque([(0, -1)])
while que:
    now, pr = que.popleft()

    if pr == -1:
        ans *= comb.npr(K - 1, chCnt[now])
    else:
        ans *= comb.npr(K - 2, chCnt[now])

    ans %= MOD
    for to in edges[now]:
        if to != pr:
            que.append((to, now))

print(ans % MOD)


### FIXED CODE ###

import sys
sys.setrecursionlimit(10 ** 7)

MOD = 10**9 + 7
N, K = map(int,input().split())

edge = [[] for _ in range(N)]

for _ in range(N-1) :
    fromNode, toNode = map(int,input().split())

    fromNode -= 1
    toNode -= 1

    edge[fromNode].append(toNode)
    edge[toNode].append(fromNode)

# 深さ優先探索
def bfs(nowNode, fromNode) :
    colorNum = K  # 使用可能な色の数
    if fromNode == -1 :  # 根の場合
        colorNum -= 1
    else :
        colorNum -= 2

    if len(edge[nowNode]) - 1 > K :  # つながっている頂点数 - 1(親) == K までOK
        return 0

    caseNum = 1
    for nextNode in edge[nowNode] :
        if nextNode == fromNode :
            continue
        caseNum *= colorNum
        colorNum -= 1
        caseNum = caseNum % MOD

    for nextNode in edge[nowNode] :
        if nextNode == fromNode :
            continue
        caseNum *= bfs(nextNode, nowNode)
        caseNum = caseNum % MOD

    return caseNum

ans = bfs(0, - 1) * K
ans = ans % MOD
print(ans)
s = str(input())
t = str(input())
 
if s == t:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

import math

a,b,c = map(int,input().split())
lst = []
lst.append(a)
lst.append(b)
lst.append(c)
lst.sort()

print(lst[2] - lst[1] + (lst[1] - lst[0]))
a = input()
if a is 'ABC':
  print('ARC')
eles:
  print('ABC')

### FIXED CODE ###

a = input()
if a == 'ABC':
  print('ARC')
else:
  print('ABC')
import math

def judge(A, B, C, D):
    if A < B:   # そもそも買えない
        return False
    if D < B:   # 補充が間に合わないのでいずれ在庫が尽きる
        return False
    if B <= C:  # 補充が間に合う状況で、必ず0個以上の在庫がある
        return True
    G = math.gcd(B, D)   # 昼の買い物の後に残る在庫数の候補のステップ数
    R = A % G       # 例えば A = 3, G = 2の場合、必ず1個あまる
    if C + G - R - B  < 0:
        # C + G - R: 在庫の最小数
        return False
    else:
        return True

T = int(input())
for _ in range(T):
    A, B, C, D = map(int, input().split())
    print('Yes') if judge(A, B, C, D) else print('No')


### FIXED CODE ###

import fractions

def judge(A, B, C, D):
    if A < B:   # そもそも買えない
        return False
    if D < B:   # 補充が間に合わないのでいずれ在庫が尽きる
        return False
    if B <= C:  # 補充が間に合う状況で、必ず0個以上の在庫がある
        return True
    G = fractions.gcd(B, D)   # 昼の買い物の後に残る在庫数の候補のステップ数
    R = A % G       # 例えば A = 3, G = 2の場合、必ず1個あまる
    if C + G - R - B  < 0:
        # C + G - R: 在庫の最小数
        return False
    else:
        return True

T = int(input())
data = []
for _ in range(T):
    data.append([int(xi) for xi in input().split()])
for A, B, C, D in data:
    print('Yes') if judge(A, B, C, D) else print('No')
# coding:utf-8
import readline
import datetime

H1 = int(input())
M1 = int(input())
H2 = int(input())
M2 = int(input())
K = int(input())


# while not 0 <= H1 < 23 and 0 <= M1 < 59 and 0 <= H2 < 23 and 0 <= M2 < 59:
#     H1 = int(raw_input())
#     M1 = int(raw_input())
#     H2 = int(raw_input())
#     M2 = int(raw_input())
#     K = int(raw_input())
    
if M2 > M1:
    a = (H2 - H1) * 60 + M2 - M1
    print(a - K)
if M2 < M1:
    b = (H2 - H1) * 60 + M1 - M2
    print(b - K)

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline

h1, m1, h2, m2, k = map(int, readline().split())
print(60 * (h2 - h1) + m2 - m1 - k)
s = list(input().strip())
N = len(s)
a = ""
for i in range(N):
    if s[i]!="x":
        a += s[i]
if a==a[::-1]:
    flag = 1
else:
    flag = 0
if flag==1:
    n = len(a)
    C = [0 for _ in range(2*n+1)]
    for i in range(1,2*n+1,2):
        C[i] = a[i//2]
    cur = 0
    ind = 0
    for i in range(N):
        if s[i]=="x":
            C[cur]="x"
            cur += 2
        else:
            if 2*ind+1>cur:
                cur += 2
            ind += 1
    cnt = 0
    for i in range(0,n,2):
        if C[i]!=C[2*n-i]:
            cnt += 1
if flag==0:
    print(-1)
else:
    print(cnt)

### FIXED CODE ###

import math
s = input().strip()
A = []
B = [0 for _ in range(len(s)+1)]
y = ""
for i in range(len(s)):
    if s[i]!="x":
        y += s[i]
        A.append(i)
        B[i+1] = B[i]
    else:
        B[i+1] = B[i]+1
flag=0
cnt = 0
for i in range(len(y)//2):
    if y[i]!=y[-(i+1)]:
        flag = 1
        cnt = -1
        break
if flag==0 and len(y)>0:
    if B[A[0]]!=B[-1]-B[A[-1]]:
        cnt += abs(B[A[0]]-(B[-1]-B[A[-1]]))
    for i in range(1,math.ceil(len(A)/2)):
        if B[A[i]]-B[A[i-1]] != B[A[-i]]-B[A[-(i+1)]]:
            cnt += abs(B[A[i]]-B[A[i-1]]-(B[A[-i]]-B[A[-(i+1)]]))
print(cnt)
count = 1
x = input()
while x != "0":
    print("Case"count": "x)
    x = input()
    count += 1

### FIXED CODE ###

c = 1
x = input()
while x != "0":
    print("Case {}: {}".format(c, x))
    x = input()
    c += 1
a,b,c,d=map(int,input().split())
AB=abs(a-b)
BC=abs(b-c)
AC=abs(a-c)

if AC=<d or (AC>d and AB<d and BC<d):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
AB=abs(a-b)
BC=abs(b-c)
AC=abs(a-c)

if AC<=d or (AC>d and AB<=d and BC<=d):
  print("Yes")
else:
  print("No")
n,l=map(int,input().split())
arr=list(map(int,input().split()))
pos=0
tmp=0
for i in range(n-1):
  if (arr[i]+arr[i+1])>tmp:
    pos=i
    tmp=(arr[i]+arr[i+1])
if tmp<l:
  print('Impossible')
else:
  print('Possible')
  ans=[]
  for i in range(pos):
    ans.append(i+1)
  for i in range(n,pos+1):
    ans.append(i)
  ans.append(pos+1)
  for i in range(n-1):
    print(ans[i])

### FIXED CODE ###

n,l=map(int,input().split())
arr=list(map(int,input().split()))
pos=0
tmp=0
for i in range(n-1):
  if (arr[i]+arr[i+1])>tmp:
    pos=i
    tmp=(arr[i]+arr[i+1])
if tmp<l:
  print('Impossible')
else:
  print('Possible')
  ans=[]
  for i in range(pos):
    ans.append(i+1)
  for i in range(n-1,pos+1,-1):
    ans.append(i)
  ans.append(pos+1)
  for i in range(n-1):
    print(ans[i])
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n)]
        self.size = [1]*n

    def find(self,a):
        if self.parent[a] == a:
            return a
        else:
            return self.find(self.parent[a])

    def unite(self,a,b):
        a_parent = self.parent[a]
        b_parent = self.parent[b]
        if a_parent == b_parent:
            return
        else:
            if self.size_of(b_parent) > self.size_of(a_parent): 
                self.parent[a_parent] = self.parent[b_parent]
                self.size[b_parent] += self.size[a_parent]
            else:
                self.parent[b_parent] = self.parent[a_parent]
                self.size[a_parent] += self.size[b_parent]
                
    def size_of(self,a):
        return self.size[self.find(a)]
    
    def is_same(self,a,b):
        return self.parent(a) == self.parent(b)


N,M,K = map(int, input().split())
uf = UnionFind(N+1)
friends = []
blocks = []
for i in range(N+1):
    blocks.append([])
    friends.append(0)

for i in range(M):
    a,b = map(int, input().split())
    friends[a] += 1
    friends[b] += 1
    uf.unite(a,b)
    
for j in range(K):
    x,y = map(int, input().split())
    blocks[x].append(y)
    blocks[y].append(x)

for i in range(1,N+1):
    print(uf.size_of(i) - friends[i] - len([x for x in range(1,N+1) if i in blocks[x] and uf.find(i) == uf.find(x)])-1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000)

class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n)]
        self.size = [1]*n

    def find(self,a):
        if self.parent[a] == a:
            return a
        else:
            return self.find(self.parent[a])

    def unite(self,a,b):
        a_root = self.find(a)
        b_root = self.find(b)
        if a_root == b_root:
            return
        else:
            if self.size_of(b_root) > self.size_of(a_root): 
                self.parent[a_root] = self.parent[b_root]
                self.size[b_root] += self.size[a_root]
            else:
                self.parent[b_root] = self.parent[a_root]
                self.size[a_root] += self.size[b_root]
                
    def size_of(self,a):
        return self.size[self.find(a)]
    
    def is_same(self,a,b):
        return self.find(a) == self.find(b)


N,M,K = map(int, input().split())
uf = UnionFind(N+1)
friends = []
blocks = [0]*(N+1)
for i in range(N+1):
    blocks.append([])
    friends.append(0)

for i in range(M):
    a,b = map(int, input().split())
    friends[a] += 1
    friends[b] += 1
    uf.unite(a,b)
    

for j in range(K):
    x,y = map(int, input().split())
    if uf.is_same(x,y):
        blocks[x] += 1
        blocks[y] += 1

for i in range(1,N+1):
    print(uf.size_of(i) - friends[i] - blocks[i] -1)
n = int(input())
a = [map(int, input().split())]
l = [0 for i in range(n)]
for i in range(len(a)):
    while a[i] % 2 == 0:
        a[i] /= 2
        l[i] += 1
print(min(l))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
l = [0 for i in range(n)]
for i in range(len(a)):
    while a[i] % 2 == 0:
        a[i] /= 2
        l[i] += 1
print(min(l))
hist = {}
while True:
    try:
        i,b = input().strip().split(',')
        if b in hist:
            hist[b] += 1
        else:
            hist[b] = 1
    except EOFError:
        break

print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O']))

### FIXED CODE ###

hist = {'A':0,'B':0,'AB':0,'O':0}
while True:
    try:
        i,b = input().strip().split(',')
        hist[b] += 1
    except EOFError:
        break

print("%d\n%d\n%d\n%d" % (hist['A'],hist['B'],hist['AB'],hist['O']))
A[0]*5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
K = int(input())

for i in range(4):
  for j in range(i+1,5):
    if abs(A[i]-A[j]) > K:
      print(':(')
      exit()
print('Yay!')

### FIXED CODE ###

A=[0]*5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())
K = int(input())
 
for i in range(4):
  for j in range(i+1,5):
    if abs(A[i]-A[j]) > K:
      print(':(')
      exit()
print('Yay!')
#!/usr/bin/env python

def popcount(n):
    ret = 0
    for i in range(18):
        if n>>i & 1:
            ret += 1
    return ret

def main():
    N = int(input())
    X = input()

    # X に含まれる "1" の数
    x_cnt = 0
    for i in range(N):
        if X[i] == "1":
            x_cnt += 1

    # i 桁目が 0 : x_cnt += 1
    # i 桁目が 1 : x_cnt -= 1
    # より, X mod x_cnt +1, X mod x_cnt-1 を事前計算しておく
    n_plus,n_minus = 0,0
    for i in range(N):
        if X[i]=="1":
            n_plus += 2**(N-1-i)
            n_plus %= x_cnt + 1
            n_minus += 2**(N-1-i)
            n_minus %= x_cnt - 1
    
    for i in range(N):
        ans = 1
        if X[i]=="1":
            # 1 -> 0 に変換した結果, １が全く存在しない場合
            if x_cnt == 1:
                print(0)
                continue
            a = (n_minus - pow(2,(N-1-i), x_cnt-1)) % (x_cnt-1)
        else:
            a = (n_plus + pow(2,(N-1-i), x_cnt+1)) % (x_cnt+1)
        while a > 0:
            pop_cnt = popcount(a)
            a %= pop_cnt
            ans += 1
        print(ans)

if __name__ == "__main__":
    main()

### FIXED CODE ###

#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

def popcount(n):
    ret = 0
    for i in range(18):
        if n>>i & 1:
            ret += 1
    return ret

def main():
    N = int(input())
    X = input().decode().rstrip()

    # X に含まれる "1" の数
    x_cnt = X.count("1")

    # i 桁目が 0 : x_cnt += 1
    # i 桁目が 1 : x_cnt -= 1
    # より, X mod x_cnt +1, X mod x_cnt-1 を事前計算しておく
    x_mod_pl,x_mod_mi = 0,0
    d_pl,d_mi = 1,1
    mod_pl,mod_mi = x_cnt+1,max(1,x_cnt-1)
    for i in range(N-1,-1,-1):
        if X[i]=="1":
            x_mod_pl = (x_mod_pl + d_pl) % mod_pl
            x_mod_mi = (x_mod_mi + d_mi) % mod_mi
        d_pl = (d_pl*2) % mod_pl
        d_mi = (d_mi*2) % mod_mi
    
    for i in range(N):
        ans = 1
        if X[i] == "1":
            # 1 -> 0 に変換した結果, １が全く存在しない場合
            if x_cnt == 1:
                print(0)
                continue
            a = (x_mod_mi - pow(2,(N-1-i), mod_mi)) % mod_mi
        else:
            a = (x_mod_pl + pow(2,(N-1-i), mod_pl)) % mod_pl

        while a > 0:
            pop_cnt = popcount(a)
            a %= pop_cnt
            ans += 1

        print(ans)

if __name__ == "__main__":
    main()
import sys
import math

for line in sys.stdin:
    a, b, x = list(map(int, line.split(' ')))

    water_height = x / (a*a)

    r = math.atan(water_height/b*2)

    print(math.degrees(r))


### FIXED CODE ###

import sys

for line in sys.stdin:
    A, B = list(map(int, line.split(' ')))


    if 1 <= A <= 9 and 1 <= B <= 9:
        out = A*B
        print(out)
    else:
        print(-1)
import sys

N,K = map(int, input().split())
res = 0
if K==0:
    print(N*N)
    sys.exit(0)
for i in range(N):
    i += 1
    if i-K<=0:
        continue
    amari = N % i
    amari = amari - K + 1
    re = N//i
    if amari<=0:
        amari = 0
    res += re*(i-K) + amari
 print(res)

### FIXED CODE ###

import sys

N,K = map(int, input().split())
res = 0
if K==0:
    print(N*N)
    sys.exit(0)
for i in range(N):
    i += 1
    if i-K<=0:
        continue
    amari = N % i
    amari = amari - K + 1
    re = N // i
    if amari <= 0:
        amari = 0
    res += re*(i-K) + amari
print(res)
n = int(input())
a = list(map(int, input().split()))

cnt = 0
for i in range(1,5):
    #print(cnt)
    if a[i] < a[i-1]:
        cnt = cnt + (a[i-1] - a[i])
        a[i] = a[i-1]
        #print(cnt)
print(cnt)

### FIXED CODE ###

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

cnt = 0
for i in range(1,n):
    if a[i] < a[i-1]:
        cnt = cnt + (a[i-1] - a[i])
        a[i] = a[i-1]

print(cnt)
x, y, z = map(int, input().split())

print(z+""+x+""+y)



### FIXED CODE ###

x,y,z=map(int,input().split())
print(z,x,y)
N, K = map(int, input().split())
s = list(input())
print("".join(s[:K]+ list(s[K].lower()) + s[K + 1:]))

### FIXED CODE ###

N, K = map(int, input().split())
s = list(input())
print("".join(s[:K-1]+ list(s[K-1].lower()) + s[K:]))
x = input()
if x<1200:
  print("ABC")
else:
  pritn("ARC")

### FIXED CODE ###

x = int(input())
print("ABC" if x<1200 else "ARC")
n,m=map(int,input().split())
a=[]
for i in range(0,n):
    b,c=map(int,input().split())
    a.append([b,c])
a.sort()
number=0
for i in range(0,len(a)):
    while number<m:
        number=number+a[i][1]
        l=i
print(l)
answer=0
kosu=0
for k in range(0,l+1):
    answer=answer+a[k][0]*a[k][1]
    kosu=kosu+a[k][1]
print(answer)
answer=answer+a[l+1][0]*(m-kosu)
print(answer)

### FIXED CODE ###

n,m=map(int,input().split())
a=[]
for i in range(0,n):
    b,c=map(int,input().split())
    a.append([b,c])
a.sort()
number=0
for i in range(0,len(a)):
    if number<m:
        number=number+a[i][1]
        l=i
answer=0
kosu=0
for k in range(0,l):
    answer=answer+a[k][0]*a[k][1]
    kosu=kosu+a[k][1]
answer=answer+a[l][0]*(m-kosu)
print(answer)
w, a, b = map(int, input().split())

if a <= b and b <= a + w:
    print(0)
elif a <= b + w and b + w <= a + w
elif b+w < a:
    print(a - (b+w))
elif a+w < b:
    print(b - (a+w))


### FIXED CODE ###

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

if a <= b and b <= a + w:
    print(0)
elif a <= b + w and b + w <= a + w:
    print(0)
elif b+w < a:
    print(a - (b+w))
elif a+w < b:
    print(b - (a+w))
import sys

x = sys.argv[1]
a = sys.argv[2]

if(x < a):
    print(0)
else:
    print(10)
    

### FIXED CODE ###

x, a = input().split()

if(x < a):
    print(0)
else:
    print(10)
from collections import deque

x, y, a, b, c = map(int, input().split())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))

# x <= a
# y <= b

P = sorted(P, reverse=True)[:x]

Q = sorted(Q, reverse=True)[:y]

P.extend(Q)
T = deque(sorted(P, reverse=True))
R = deque(sorted(R, reverse=True))

ans = 0
for i in range(x+y):
    if T[0] >= R[0]:
        ans += T.popleft()
    else:
        ans += R.popleft()

print(ans)


### FIXED CODE ###

from collections import deque

x, y, a, b, c = map(int, input().split())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))

P = sorted(P, reverse=True)[:x]

Q = sorted(Q, reverse=True)[:y]

P.extend(Q)
R.extend(P)

T = sorted(R, reverse=True)[:x+y]
print(sum(T))
N,W = map(int,input().split())
w_v = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*W for _ in range(N)]

for i in range(0,N):
  if i == 0:
    if W>=w_v[0][0]:
      for j in range(w_v[0][0]-1,W):
        dp[i][j] = w_v[0][1]
  else:
    for j in range(W):
      if j-w_v[i][0]>=0:
        dp[i][j] = max(dp[i-1][j],dp[i-1][j-w_v[i][0]]+w_v[i][1])
      else:
        dp[i][j] = dp[i-1][j]

print(max(dp[-1]))

### FIXED CODE ###

N,W = map(int,input().split())
w_v = [list(map(int,input().split())) for i in range(N)]
INF = float("inf")
dp = [[INF]*100001 for i in range(N+1)]
dp[0][0]=0

for i in range(N):
  for j in range(100001):
    if j >= w_v[i][1]:
      dp[i+1][j] = min(dp[i][j],dp[i][j-w_v[i][1]]+w_v[i][0])
    else:
      dp[i+1][j] = dp[i][j]
    
ans = 0
for j in range(100001):
  if dp[-1][j] <= W:
    ans = max(ans,j)
print(ans)
O = input()
E = input()

tail = len(O) - len(E)

print("".join((x + y for x, y in zip([O, O[:-1]][tail], E) + ["", O[-1]][tail])


### FIXED CODE ###

O = input()
E = input()

tail = len(O) - len(E)

print("".join((x + y for x, y in zip([O, O[:-1]][tail], E))) + ["", O[-1]][tail])
n=int(input())
i=1
while i*i<=n:
    i+=1
print(i-1)*(i-1)


### FIXED CODE ###

n=int(input())
i=1
while i*i<=n:
    i+=1
print((i-1)*(i-1))
# import math
# import bisect
# import heapq
# from collections import deque
import numpy as np

n,m = map(int,input().split())
s,c = [0] * m, [0] * m
for i in range(m):
    s[i],c[i] = map(int,input().split())

# replace = [False] * n
ans = list('a'* n)

for i in range(m):

    if len(ans) != 1 and s[i] == 1 and c[i] == 0:
        ans = -1
        break
    elif ans[s[i]-1] != 'a' and str(c[i]) != ans[s[i]-1]:
        ans = -1
        break

    ans[s[i]-1] = str(c[i])
if n == 1 and ans[0] == 0: print(0)

elif not ans == -1:

    for i in range(n):
        if i == 0 and ans[i] == 'a': ans[0] = '1'
        elif ans[i] == 'a': ans[i] = '0'

    print(''.join(ans))

elif : print(-1)


### FIXED CODE ###

# import math
# import bisect
# import heapq
# from collections import deque
import numpy as np

n, m = map(int, input().split())
s, c = [0] * m, [0] * m
for i in range(m):
    s[i], c[i] = map(int, input().split())

# replace = [False] * n
number = ['a'] * n
ans = 0
for i in range(m):

    if number[s[i]-1] != 'a' and str(c[i]) != number[s[i]-1]:
        ans = -1
        break

    number[s[i]-1] = str(c[i])

if not ans == -1:
    for i in range(n):
        if i == 0 and number[i] == 'a' and len(number) != 1:
            number[0] = '1'
        elif number[i] == 'a':
            number[i] = '0'
    ans = ''.join(number)

    if n != 1 and number[0] == '0':
        ans = -1
print(ans)
x, a = input()
x = int(x)
a = int(a)
if x < a:
	print(0)
else:
	print(10)

### FIXED CODE ###

x, a = input().split()
x = int(x)
a = int(a)
if x < a:
	print(0)
else:
	print(10)
tap,out = map(int,input().split()
print((out-1)/(tap-1))


### FIXED CODE ###

a,b = map(int,input().split())
m = 1
cnt = 0
while m < b:
    m -= 1
    m += a
    cnt += 1
print(cnt)
def gcd(a,b) :
    if b>0 :
        return gcd(b,a % b)
    elif b == 0:
        return a


N,X = map(int,input().split())
x = list(map(int,input().split()))
if N == 1:
    print(abs(x[0] - X))
else:
    xlen = []
    for i in range(N):
        xlen.append(x[i] - X)
    ans = xlen[0]
    for i in range(1,N):
        ans = gcd(ans,xlen[i])
    print(ans)

### FIXED CODE ###

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


N,X = map(int,input().split())
x = list(map(int,input().split()))
if N == 1:
    print(abs(x[0] - X))
else:
    xlen = []
    for i in range(N):
        xlen.append(abs(x[i] - X))
        #print(xlen[i])
    ans = xlen[0]
    for i in range(1,N):
        ans = gcd(ans,xlen[i])
        #print(ans)
    print(ans)
N,K = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 
A_done = [0]*N
A_route = []
point = 1
end_point = 0
while A_done[point-1]==0:
  A_done[point-1] = 1
  A_route.append(point)
  point = A[point-1]
  if A_done[point-1]==1:
    end_point = point
cal = K%len(A_route)
roop = A_route.index(end_point)
f_len = len(A_route[:roop])
roop_len = len(A_route[roop:])
A_roop = A_route[roop:]
if K >= f_len + roop_len:
  cal = (K-f_len)%(len(A_roop))
  #print(cal)
  print(A_roop[cal])
else:
  print(A_route(K))

### FIXED CODE ###

N,K = (int(i) for i in input().split()) 
A = [int(i) for i in input().split()] 
A_done = [0]*N
A_route = []
point = 1
end_point = 0
while A_done[point-1]==0:
  A_done[point-1] = 1
  A_route.append(point)
  point = A[point-1]
  if A_done[point-1]==1:
    end_point = point
cal = K%len(A_route)
roop = A_route.index(end_point)
f_len = len(A_route[:roop])
roop_len = len(A_route[roop:])
A_roop = A_route[roop:]
if K >= f_len + roop_len:
  cal = (K-f_len)%(len(A_roop))
  #print(cal)
  print(A_roop[cal])
else:
  print(A_route[K])
import sys
rawdata=sys.stdin.readline()
rawdata.rstrip('\n')
rawdata2=list(rawdata)
line=list(map(int,rawdata2))
line=list(map(int,list(str(input()))))
length=len(line)
while True:
  line2=[]
  for i in range(len(line)-1):
    if line[i]!=2 and line[i]!=line[i+1]:
      line[i]=2
      line[i+1]=2
    elif line[i]!=2:
      line2.append(line[i])
  if len(line)!=0 and line[len(line)-1]!=2:
      line2.append(line[len(line)-1])
  if 2 in line:
    line=[i for i in line2]
  else:
    break
print(length-len(line))


### FIXED CODE ###

s=str(input())
if s.count('1')>s.count('0'):
    print(s.count('0')*2)
else:
    print(s.count('1')*2)
N,A,B = map(int, input().split())

print(min(A*N),B)

### FIXED CODE ###

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

print(min(A*N,B))
import math

import numpy as np
import scipy as scp
import sklearn as skl

# 入力の受け取り
s,t = input().split()
a,b = map(int,input().split())
u = input()

dic = {s:a,t:b}

if u == s:
    dic[s] -= 1
else:
    dic[t] -= 1

print(dic[s],dic[t])

### FIXED CODE ###

import math

import numpy as np
import scipy as scp

# 入力の受け取り
s,t = input().split()
a,b = map(int,input().split())
u = input()

dic = {s:a,t:b}

if u == s:
    dic[s] -= 1
else:
    dic[t] -= 1

print(dic[s],dic[t])