Harryxun/stf_run huggingface dataset:
from heapq import heappop, heappush
mod = 10**9+7
n, k = map(int, input().split())
a = [int(x) for x in input().split()]


def sgn(x):
    if x > 0:
        return 0
    elif x < 0:
        return 1
    else:
        return 2


pl = []
mn = []
zr = []

for x in a:
    if x > 0:
        pl.append(x)
    elif x < 0:
        mn.append(-x)
    else:
        zr.append(x)

pl = sorted(pl, reverse=True)
mn = sorted(mn, reverse=True)


b = [(abs(a[i]), sgn(a[i])) for i in range(n)]
b = sorted(b, reverse=True)

c = [0, 0, 0]
for i in range(k):
    c[b[i][1]] += 1
    if c[2] > 1:
        print(0)
        exit()


def solve(c):
    ans = 1
    for i in range(c[0]):
        ans *= pl[i]
        ans %= mod
    for i in range(c[1]):
        ans *= mn[i]
        ans %= mod
    return ans


if c[1] % 2 == 0:
    print(solve(c))
elif c[0] <= len(pl) - 1:
    c[0] += 1
    c[1] -= 1
    print(solve(c))
elif c[0] == len(pl):
    if c[0] == 0:
        if len(zr) > 0:
            print(0)
            exit()
        else:
            tmp = 1
            for i in range(k):
                tmp *= mn[-i-1]
                tmp %= mod
            print((-tmp) % mod)
    else:
        if c[1] <= len(mn) - 1:
            c[0] -= 1
            c[1] += 1
            print(solve())
        else:
            print(solve())


### FIXED CODE ###

from heapq import heappop, heappush
mod = 10**9+7
n, k = map(int, input().split())
a = [int(x) for x in input().split()]


def sgn(x):
    if x >= 0:
        return 0
    elif x < 0:
        return 1


pl = []
mn = []

for x in a:
    if x >= 0:
        pl.append(x)
    elif x < 0:
        mn.append(-x)

pl = sorted(pl, reverse=True)
mn = sorted(mn, reverse=True)


b = [(abs(a[i]), sgn(a[i])) for i in range(n)]
b = sorted(b, reverse=True)

c = [0, 0]
for i in range(k):
    c[b[i][1]] += 1


def solve(c):
    ans = 1
    for i in range(c[0]):
        ans *= pl[i]
        ans %= mod
    for i in range(c[1]):
        ans *= mn[i]
        ans %= mod
    if c[1] % 2:
        ans = (-ans) % mod
    return ans


if c[1] % 2 == 0:
    print(solve(c))
    exit()

if len(mn) == n and k % 2:
    tmp = 1
    for i in range(k):
        tmp *= mn[-i-1]
        tmp %= mod
    ans = -tmp
    print(ans % mod)
    exit()

ans = 0

chk1 = False
chk2 = False

if c[0] <= len(pl) - 1:
    chk1 = True

if 0 < c[0] and c[1] <= len(mn)-1:
    chk2 = True

if chk1 and chk2:
    tmp1 = pl[c[0]]*pl[c[0]-1]
    tmp2 = mn[c[1]]*mn[c[1]-1]
    if tmp1 > tmp2:
        c[0] += 1
        c[1] -= 1
        print(solve(c))
    else:
        c[0] -= 1
        c[1] += 1
        print(solve(c))
elif chk1:
    c[0] += 1
    c[1] -= 1
    print(solve(c))
elif chk2:
    c[0] -= 1
    c[1] += 1
    print(solve(c))
else:
    print(solve(c))
N = int(input())
A = list(map(int,input().split()))

number_list = [0]*1000000
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,1000000):
    count = 0
    for j in range(1,1000000):
        if i*j > 1000000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")

### FIXED CODE ###

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

number_list = [0]*1000010
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,1000001):
    count = 0
    for j in range(1,1000001):
        if i*j > 1000000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")
a,b,c = list(map(int, input().split()))
print(min(a*b), c)

### FIXED CODE ###

a,b,c = list(map(int, input().split()))
print(min(a*b, c))
from math import ceil
from bisect import bisect_right
n,d,a=map(int,input().split())
lis=[list(map(int,input().split())) for i in range(n)]
x=[]
lis.sort()
for i in range(n):
  x.append(lis[i][0])
ran,ans,cnt=2*d,0,0
s=[0]*(n+1)
for i in range(n):
  r=lis[i][0]+ran
  inde=bisect_right(x,r)
  if inde!=i+1:
    if ceil(lis[i][1]/a)>cnt:
      s[inde]-=ceil(lis[i][1]/a)-cnt
      s[i]+=ceil(lis[i][1]/a)-cnt
      cnt=ceil(lis[i][1]/a)
  else:
    if ceil(lis[i][1]/a)>cnt:
      s[i]+=ceil(lis[i][1]/a)-cnt
      cnt=0
for i in range(n-1):
  s[i+1]+=s[i]
print(max(s))

### FIXED CODE ###

from math import ceil
h,a=map(int,input().split())
print(ceil(h/a))
N,M=map(int, input().split())

max = 0
min = 0

for _ in range(M):
    L,R = map(int, input().split())

    if min < L:
        min = L
    elif min == 0:
        min = L

    if max > R:
        max = R
    elif max =+ 0:
        max = R

ans = max - min + 1

print(ans)

### FIXED CODE ###

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

max = 0
min = 0

for _ in range(M):
    L,R = map(int, input().split())

    if min <= L:
        min = L
    elif min == 0:
        min = L

    if max >= R:
        max = R
    elif max == 0:
        max = R

ans = max - min + 1

if ans < 0:
    ans = 0

print(ans)
N, M = map(int,input().split())

class ID:
    def __init__(self,p,y,i):
        self.p = p
        self.y = y
        self.i = i
        self.IDed = False
        self.ID1 = None
        self.ID2 = None

    def ID(self):
        for i in range(1,6):
            if self.ID1 < 10**i:
                self.ID1 = "0"*(6-i) + str(self.ID1)
                break
        for i in range(1,6):
            if int(self.ID2) < 10**i:
                self.ID2 = "0"*(6-i) + str(self.ID2)
                break
        
        return self.ID1 + self.ID2

cities = []
for i in range(0,M):
    P,Y = map(int,input().split())
    cities.append(ID(P,Y,i))

for p in range(1,N+1):
    pref = []
    for i in range(0,M):
        if not cities[i].IDed:
            if cities[i].p == p:
                pref.append([cities[i].y, cities[i].i])
                cities[i].IDed = True
    pref.sort()
    count = 1
    for i,j in pref:
        cities[j].ID2 = count
        count = count + 1
        cities[j].ID1 = p

for i in range(0,M):
    print(cities[i].ID())

### FIXED CODE ###

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

class ID:
    def __init__(self,p,y,i):
        self.p = p
        self.y = y
        self.i = i
        self.ID1 = None
        self.ID2 = None

    def ID(self):
        for i in range(1,7):
            if self.ID1 < 10**i:
                self.ID1 = "0"*(6-i) + str(self.ID1)
                break
        for i in range(1,7):
            if int(self.ID2) < 10**i:
                self.ID2 = "0"*(6-i) + str(self.ID2)
                break
        
        return self.ID1 + self.ID2

cities = []
for i in range(0,M):
    P,Y = map(int,input().split())
    cities.append(ID(P,Y,i))
cities.sort(key = lambda x: x.y)
counter = [-1]

for i in range(0,N):
    counter.append(1)

for c in cities:
    c.ID1 = c.p
    c.ID2 = counter[c.p]
    counter[c.p] = counter[c.p] + 1

cities.sort(key = lambda x: x.i)

for i in range(0,M):
    print(cities[i].ID())
import numpy as np
n = int(input())

l = np.array([int(i) for i in input().split()])
l.sort()

c = np.bincount(l,minlength = 2100)

cum = list(c.cumsum())

ans = 0
for i in range(n):
    for j in range(i+1, n):
        ans += cum[min(l[i]+l[j]-1, 1000)] - (j+1)
print(ans)


### FIXED CODE ###

import bisect
n = int(input())
l = sorted([int(i) for i in input().split()])

ans = 0
for i in range(n):
    for j in range(i+1,n):
        a = l[i]
        b = l[j]
        tri = bisect.bisect_left(l,a+b)
        ans += tri-j-1
        
print(ans)
N = int(input())
arr = [list(map(int, input().split())) for _ in range(N)]
#arr.sort(key=lambda l:-l[2])
 
for cx in range(101):
  for cy in range(101):
    ch = None
    for x, y, h in arr:
      t = h + abs(cx-x) + abs(cy-y)
      if h > 0:
        if ch is not None and t != ch:
          break
        ch = t
      else:
        if t < ch:
          break
    else:
      print(cx, cy, ch)
      exit()

### FIXED CODE ###

N = int(input())
arr = [list(map(int, input().split())) for _ in range(N)]
arr.sort(key=lambda l:-l[2])
 
for cx in range(101):
  for cy in range(101):
    ch = None
    for x, y, h in arr:
      t = h + abs(cx-x) + abs(cy-y)
      if h > 0:
        if ch is not None and t != ch:
          break
        ch = t
      else:
        if t < ch:
          break
    else:
      print(cx, cy, ch)
      exit()
alice = int(raw_input())
bob = int(raw_input())
if alice == 1: alice = 14
if bob == 1: bob = 14
if alice < bob:
   print 'Alice'
elif alice > bob:
   print 'Bob'
else:
   print 'Draw'


### FIXED CODE ###

alice, bob = [int(x) for x in raw_input().split()]
if alice == 1: alice = 14
if bob == 1: bob = 14
if alice < bob:
   print 'Bob'
elif alice > bob:
   print 'Alice'
else:
   print 'Draw'
print(input().count("1"))


### FIXED CODE ###

print(input().count("1"))
N=int(input())
M=1000000007
dp = [0]*N

E = []
for i in range(N):
    E.append([])

def dfs(cur,pre):
    for r,d in E[cur]:
        if r != pre:
            dp[r] = dp[cur] + d
            dfs(r,cur)


for i in range(N-1):
    x,y,d= list(map(int,input().split()))
    E[x-1].append((y-1,d))
    E[y-1].append((x-1,d))

Q,K = list(map(int,input().split()))

dfs(K-1,-1)

for j in range(Q):
    s,g= list(map(int,input().split()))
    print(dp[s-1]+dp[g-1])

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

N=int(input())
dp = [0]*N

E = []
for i in range(N):
    E.append([])

def dfs(cur,pre):
    for r,d in E[cur]:
        if r != pre:
            dp[r] = dp[cur] + d
            dfs(r,cur)


for i in range(N-1):
    x,y,d= list(map(int,input().split()))
    E[x-1].append((y-1,d))
    E[y-1].append((x-1,d))

Q,K = list(map(int,input().split()))

dfs(K-1,-1)

for j in range(Q):
    s,g= list(map(int,input().split()))
    print(dp[s-1]+dp[g-1])
a, b = map(str, input().split())
if a = 'H':
  print(b)
else:
  if b = 'H':
    print('D')
  else:
    print('H')

### FIXED CODE ###

a, b = map(str, input().split())
if a == 'H':
  print(b)
else:
  if b == 'H':
    print('D')
  else:
    print('H')
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <tuple>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define repdm(i, a, b) for (ll i = (ll)(a); i > (ll)(b); i--)

int main()
{

  int n;
  cin >> n;
  int v[n];

  rep(i, n) cin >> v[i];

  int seq0[100001] = {}, seq1[100001] = {};
  for (int i = 0; i < n; i += 2)
    ++seq0[v[i]];
  for (int i = 1; i < n; i += 2)
    ++seq1[v[i]];

  sort(seq0 + 1, seq0 + 100001, greater<int>());
  sort(seq1 + 1, seq1 + 100001, greater<int>());

  if (seq0[0] == seq1[0])
    cout << min(n - seq0[0] - seq1[1], n - seq0[1] - seq1[0]);
  else
    cout << n - seq0[0] - seq1[0];
}

### FIXED CODE ###

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

judge_2n_1 = {}
judge_2n = {}

for i in range(n):
    if i % 2 == 0:
        if v[i] not in judge_2n_1.keys():
            judge_2n_1[v[i]] = 1
        else:
            judge_2n_1[v[i]] += 1
    else:
        if v[i] not in judge_2n.keys():
            judge_2n[v[i]] = 1
        else:
            judge_2n[v[i]] += 1

judge_2n = sorted(judge_2n.items(), key=lambda x: x[1], reverse=True)
judge_2n_1 = sorted(judge_2n_1.items(), key=lambda x: x[1], reverse=True)
answer = n - 1

for i in judge_2n[:2]:
    for j in judge_2n_1[:2]:
        if i[0] != j[0]:
            answer = min(answer, n - i[1] - j[1])
        else:
            answer = min(answer, n - max(i[1], j[1]))

print(answer)
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = input()
println(l[k])

### FIXED CODE ###

l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int (input())
 
print(l[k-1])
import sys
sys.setrecursionlimit(100000)
N, K = list(map(int,input().split()))
ab = [list(map(int, input().split())) for _ in range(N - 1)]
MOD = 1000000007
if N == 1:
    print(K)
    exit()

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

for i in range(N - 1):
    tree[ab[i][0] - 1].append(ab[i][1] - 1)
    tree[ab[i][1] - 1].append(ab[i][0] - 1)


ans = K * (K - 1) % MOD

def f(x, y):
    global ans
    count = 2
    for i in range(len(tree[y])):
        if tree[y][i] != x:
            f(y, tree[y][i])
            ans = ans * (K - count) % MOD
            count += 1


first = 0
for i in range(N):
    if len(tree[i]) == 1:
        first = i
        break
f(first, tree[first][0])


print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)
N, K = list(map(int,input().split()))
ab = [list(map(int, input().split())) for _ in range(N - 1)]
MOD = 1000000007
if N == 1:
    print(K)
    exit()

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

for i in range(N - 1):
    tree[ab[i][0] - 1].append(ab[i][1] - 1)
    tree[ab[i][1] - 1].append(ab[i][0] - 1)


ans = K * (K - 1) % MOD

def f(x, y):
    global ans
    count = 2
    for i in range(len(tree[y])):
        if tree[y][i] != x:
            f(y, tree[y][i])
            ans = ans * (K - count) % MOD
            count += 1


first = 0
for i in range(N):
    if len(tree[i]) == 1:
        first = i
        break
f(first, tree[first][0])


print(ans)
n = int(input())
a = list(map(int,input().split()))
s = 1
if 0 in a:
    print(0)
else:
    for i in a:
        s *= i
        if s > 10**18:
            print(-1)
            break
    if s <= 10**18:
        print(s)

### FIXED CODE ###

from decimal import * 
import math
a,b = input().split()
a = int(a)
b = Decimal(b)
print(int(a*b))
S = str(input())

count = 0
result = []

for i in range(len(S)):
  if S[i] == "A" or "C" or "G" or "T":
    count += 1
  else:
    result.append(count)
    count = 0

max = result[0]
    
for j in range(len(result)):
  if max < result[j]:
    max = result[j]

print(max)

### FIXED CODE ###

S = str(input())

count = 0
result = []

for i in range(len(S)):
  if (S[i] == "A") or (S[i] == "C") or (S[i] == "G") or (S[i] == "T"):
    count += 1
    if i == len(S) - 1:
      result.append(count)
  else:
    result.append(count)
    count = 0
    if i == len(S) - 1:
      result.append(count)

maxi = result[0]
    
for j in range(len(result)):
  if maxi < result[j]:
    maxi = result[j]

print(maxi)
3 4a, b = map(int, input().split())
ans = 'Even' if (a * b) % 2 == 0 else 'Odd'
print(ans)

### FIXED CODE ###

a, b = map(int, input().split())
ans = 'Even' if (a * b) % 2 == 0 else 'Odd'
print(ans)
a,b=map(int,input().split())

def xor(p):
  if p%4 == 0:
    return p
  elif p%4 == 1:
    return 1
  elif p%4 == 2:
    return p+1:
  elif p%4 == 3:
    return 0

if a==0:
  print(xor(b))
elif a == b:
  print(a)
else:
  s=xor(b)
  t=xor(a-1)
  data=[]
  while b>0:
    data.append(b%2)
    b=b//2
  for i in range(len(data)):
    if (data[i] == a%2):
      data[i] = 0
    else:
      data[i] = 1
    a = a//2
  sum=0
  for i in range(len(data)):
    sum+= data[i]*(2**i)
  print(sum)

### FIXED CODE ###

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

def xor(p):
  if p%4 == 0:
    return p
  elif p%4 == 1:
    return 1
  elif p%4 == 2:
    return p+1
  elif p%4 == 3:
    return 0

if a==0:
  print(xor(b))
elif a == b:
  print(a)
else:
  s=max(xor(b),xor(a-1))
  t=min(xor(a-1),xor(b))
  data=[]
  while s>0:
    data.append(s%2)
    s=s//2
  for i in range(len(data)):
    if (data[i] == t%2):
      data[i] = 0
    else:
      data[i] = 1
    t = t//2
  sum=0
  for i in range(len(data)):
    sum+= data[i]*(2**i)
  print(sum)
n, m = map(int, input().split())
lst = [x for x in range(n)]
dic = {}
not_found = False
special_case = False
for i in range(m):
    a, b = map(int, input().split())
    if str(a) not in list(dic.keys()):
        dic[str(a)] = b
    else:
        if dic[str(a)] != b:
            not_found = True
    lst[a - 1] = b
if m == 0:
    special_case = True
if not_found:
    print(-1)
elif special_case:
    if n == 1:
        print(0)
    elif n == 2:
        print(10)
    else:
        print(100)
else:
    for i in range(n):
        if str(i + 1) not in list(dic.keys()):
            if i + 1 == 1:
                lst[i] = 1
            else:
                lst[i] = 0
    lst = list(map(str, lst))
    res = ''.join(lst)
    if res[0] == '0' and len(res) > 1:
        print(-1)
    else:
        print(int(res))
Seen by Sokun Deborey at 8:27 PM
Ang Sivhour

### FIXED CODE ###

n, m = map(int, input().split())
lst = [x for x in range(n)]
dic = {}
not_found = False
special_case = False
for i in range(m):
    a, b = map(int, input().split())
    if str(a) not in list(dic.keys()):
        dic[str(a)] = b
    else:
        if dic[str(a)] != b:
            not_found = True
    lst[a - 1] = b
if m == 0:
    special_case = True
if not_found:
    print(-1)
elif special_case:
    if n == 1:
        print(0)
    elif n == 2:
        print(10)
    else:
        print(100)
else:
    for i in range(n):
        if str(i + 1) not in list(dic.keys()):
            if i + 1 == 1:
                lst[i] = 1
            else:
                lst[i] = 0
    lst = list(map(str, lst))
    res = ''.join(lst)
    if res[0] == '0' and len(res) > 1:
        print(-1)
    else:
        print(int(res))
n=int(input())

ans={}
inp_list=[]
G=[0 for i in range(n+1)]
T=[[] for i in range(n+1)]
for i in range(n-1):
    #print(G)
    a,b=map(int,input().split())
    inp_list.append((a,b))
    T[a].append(b)
    T[b].append(a)

L=[len(ppp) for ppp in T]
mod=max(L)

def addd(x,mod):
    x+=1
    if x==mod+1:
        x=1
    return x

def tansa(now,color):
    #print(T)
    now_col=color
    for i in T[now]:
        if G[i]==0:
            if now_col==color:
                now_col=addd(now_col,mod)
            G[i]==now_col
            ans[(now,i)]=now_col
            T[i].remove(now)
            tansa(i,now_col)
            now_col=addd(now_col,mod)


tansa(1,0)

print(mod)

for i in range(n-1):
    print(ans[inp_list[i]])

### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

n=int(input())

ans={}
inp_list=[]
G=[0 for i in range(n+1)]
T=[[] for i in range(n+1)]
for i in range(n-1):
    #print(G)
    a,b=map(int,input().split())
    inp_list.append((a,b))
    T[a].append(b)
    T[b].append(a)

L=[len(ppp) for ppp in T]
mod=max(L)

def addd(x,mod):
    x+=1
    if x==mod+1:
        x=1
    return x

def tansa(now,color):
    #print(T)
    now_col=color
    for i in T[now]:
        if G[i]==0:
            if now_col==color:
                now_col=addd(now_col,mod)
            G[i]==now_col
            ans[(now,i)]=now_col
            T[i].remove(now)
            tansa(i,now_col)
            now_col=addd(now_col,mod)


tansa(1,0)

print(mod)

for i in range(n-1):
    print(ans[inp_list[i]])
import sys
import numpy as np

# input処理を高速化する
input = sys.stdin.readline

# 入力
S = input()
T = input()

def lcs(s, t):
    dp = np.zeros((len(S)+1, len(T)+1), dtype=int)

    for i in range(len(S)):
        for j in range(len(T)):
            if S[i] == T[j]:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] = np.maximum(dp[i+1][j], dp[i][j+1])
    
    ans = ''
    i = len(S)
    j = len(T)
    while (i>0  and j>0):
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            ans += s[i-1] 
            i -= 1
            j -= 1
    
    print(ans[::-1])

### FIXED CODE ###

import sys

# input処理を高速化する
input = sys.stdin.readline

# 入力
S = input()
T = input()

def chmax(a, b):
    if a >= b:
        return a
    else:
        return b


def lcs(s, t):
    dp = [[0 for i in range(len(T)+1)] for j in range(len(S)+1)]
    for i in range(len(S)):
        for j in range(len(T)):
            if S[i] == T[j]:
                dp[i+1][j+1] = chmax(dp[i+1][j+1], dp[i][j] + 1)
            dp[i+1][j+1] = chmax(dp[i+1][j+1], dp[i+1][j])
            dp[i+1][j+1] = chmax(dp[i+1][j+1], dp[i][j+1])

    ans = ''
    i = len(S)
    j = len(T)
    while (i>0  and j>0):
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            ans += s[i-1] 
            i -= 1
            j -= 1
    
    print(ans[::-1])

        
lcs(S, T)
import math
def cmb(n,r):
  return math.factorial(n)//(math.factorial(r)*math.factorial(n-r))
n=int(input())
a=list(map(int,input().split()))
a.sort()
ls=[0]
cnt=0
for i in range(1,2**n):
  if a[i]>a[i-1]:
    cnt+=1
  ls.append(cnt)
lmt = []
for i in range(n+1):
  lmt.extend([i]*cmb(n,i))
bias = ls[-1]-lmt[-1]
jdg = 0
ulmt = 0
for i in range(n):
  jdg += ls.count(i)
  ulmt += 2**(n-i-1)
  if jdg > ulmt:
    print("No")
    exit()
for x,l in zip(ls,lmt):
  if x-l > bias:
    print("No")
    break
else:
  print("Yes")

### FIXED CODE ###

print(int(input())**3)
X = int(input())

cand = int(pow(X, 0.2))
diff = - (X - pow(cand, 5))

for i in range(-cand, cand + 1):
    if pow(cand, 5) - pow(i, 5) == X:
        other = i

print(cand, other)

### FIXED CODE ###

import sys
X = int(input())

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        cand = i ** 5 - j ** 5
        if X == cand:
            print(i, j)
            sys.exit()
import numpy as np
import collections as cl
n=int(input())
l=np.asarray(list(map(int,input().split())))
i=np.tile(np.arange(len(l)),(n**2,1)).T.ravel()
j=np.tile(np.tile(np.arange(len(l)),(n,1)).ravel(),(n,1)).T.ravel()
k=np.tile(np.arange(n),(n**2,1)).ravel()
tmp=(l[i]<l[j]+l[k])*(l[j]<l[i]+l[k])*(l[k]<l[i]+l[j])*(i!=j)*(i!=k)*(j!=k)
tmp=np.asarray(np.where(tmp.reshape(n,n,n))).T.astype(str)
tmp.sort(axis=-1)
ans=[]
for t in tmp:
    ans.append(t[0]+t[1]+t[2])
print(len(cl.Counter(ans)))

### FIXED CODE ###

from bisect import bisect_left
 
n = int(input())
l = sorted(list(map(int,input().split())))

ans = 0
for i in range(n-2):
    for j in range(i+1,n-1):
        k = bisect_left(l,l[i]+l[j])
        ans += k - j - 1

print(ans)
n,m = map(int, input().split())
p = list(map(int, input().split()))
par = [i for i in range[n]]
rank = [0 for x in range(n)]

def root(x):
	tmp = par[x]
	if tmp == x:
		return x
	else:
		a = root[tmp]
		par[x] = a
		return a

def merge(x, y):
	x = root(x)
	y = root(y)
	if x == y:
		return
	else:
		if rank[x] > rank[y]:
			par[y] = x
			rank[y] += rank[x]
		else:
			par[x] = y
			rank[x] += rank[y]
	return

for i in range(m):
	x, y = map(int, input().split())
	merge(x-1, y-1)

ans = 0

for i in range(n):
	if p[i]-1 == i:
		ans += 1
	elif root(p[i]-1) == root(i):
		ans += 1

print(ans)

### FIXED CODE ###

n,m = map(int, input().split())
p = list(map(int, input().split()))
par = [i for i in range(n)]
rank = [0 for x in range(n)]

def root(x):
	tmp = par[x]
	if tmp == x:
		return x
	else:
		a = root(tmp)
		par[x] = a
		return a

def merge(x, y):
	x = root(x)
	y = root(y)
	if x == y:
		return
	else:
		if rank[x] > rank[y]:
			par[y] = x
			rank[y] += rank[x]
		else:
			par[x] = y
			rank[x] += rank[y]
		return

for i in range(m):
	x, y = map(int, input().split())
	merge(x-1, y-1)

ans = 0

for i in range(n):
	if p[i]-1 == i:
		ans += 1
	elif root(p[i]-1) == root(i):
		ans += 1

print(ans)
a,b,c,d = map(int,input().split())
print('Yes' if abs(a-c) <= d or (abs(a-b)<=d and abs(b-c)<=d else 'No')

### FIXED CODE ###

a,b,c,d = map(int,input().split())
print('Yes' if abs(a-c) <= d or (abs(a-b)<=d and abs(b-c)<=d) else 'No')
import math
X = int(input())

half = int(X/2)
i = X
while i >=X:
    for j in range(2,int(i/2)):
        if math.gcd(i,j) == 1:
            pass

        else:
            i += 1
            continue

    print(i)
    exit()




### FIXED CODE ###

import fractions
X = int(input())

half = int(X/2)
i = X
while i >=X:
    for j in range(2,int(i/2)):
        if fractions.gcd(i,j) == 1:
            pass

        else:
            i += 1
            continue

    print(i)
    exit()
A,B=map(int,input().split())
if A==1:
  A+=13
if B==1:
  B+=13:

if A==B:
  print("Draw")
elif A<B:
  print("Bob")
else:
  print("Alice")

### FIXED CODE ###

A,B=map(int,input().split())
if A==1:
  A+=13
if B==1:
  B+=13

if A==B:
  print("Draw")
elif A<B:
  print("Bob")
else:
  print("Alice")