Harryxun/stf_run huggingface dataset:
N,W=map(int,input().split())
v=[0]*N
w=[0]*N
for i in range(N):
    v[i],w[i]=map(int,input().split())
dp=[[0]*(W+1) for _ in range(N)]
for i in range(N):
    for j in range(1,W+1):
        if w[i]>j:
            dp[i][j]=dp[i-1][j]
        else:
            dp[i][j]=max(dp[i-1][j],v[i]+dp[i-1][j-w[i]])
print(dp[N-1][W])

### FIXED CODE ###

n,wmax=map(int,input().split())
v=[0]*n
w=[0]*n
for i in range(n):
    w[i],v[i]=list(map(int,input().split()))
sv=sum(v)+1
dp=[[float('inf')]*sv for _ in range(n)]
dp[0][v[0]-1]=w[0]
for i in range(n):
    dp[i][0]=0
for i in range(n):
    for j in range(sv):
        dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i])
ans=float('inf')
for p in range(sv-1,-1,-1):
    if dp[n-1][p]!=ans and dp[n-1][p]<=wmax:
        ans=p
        break
print(ans)
S = input()
T = input()


countbox=[]
for n in range(len(S)-len(T)):
    count =0
    for i in range(len(T)):
        if T[i] != S[i+n+1]:
            count+=1
    countbox.append(count)
print(min(countbox))

### FIXED CODE ###

S = input()
T = input()

if len(S)==len(T):
    count=0
    for i in range(len(T)):
        if T[i] != S[i]:
            count+=1
    print(count)

else:
    countbox=[]
    for n in range(len(S)-len(T)+1):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n]:
                count+=1
        countbox.append(count)
    print(min(countbox))
n = input()
a = []
b = []

for i in range(n):
  a[i] = input()

m = input()
for j in range(m):
  b[j] = input()

for j in range(m):
  for i in range(n):
    if b[j] - a[i] < 0:
      i = i + 1
    elif b[j] - a[i] == 0:
      return yes
    elif b[j] - a[i] > 0:
      b[j] = b[j] - a[i]
return no

### FIXED CODE ###

n = int(raw_input())
A = map(int,raw_input().split())
q = int(raw_input())
m = map(int,raw_input().split())

def solve(i,m):
  if m == 0:
    return 1
  if i >= n or m - sum(A) > 0:
    return 0
  res = solve(i+1,m) or solve(i+1,m-A[i])
  return res

for j in range(q):
  if solve(0,m[j]):
    print "yes"
  else:
    print "no"
import math

a, b, x = map(int, input().split())
if(x >= 0.5*a*a*b):
  t_theta = (2*b)/a - (2*x)/a**3
  print (180 * math.atan(t_theta)) / math.pi
else:
  t_theta = (a*b*b) / (2*a)
  print (180 * math.atan(t_theta)) / math.pi

### FIXED CODE ###

import numpy as np

a, b, x = map(int, input().split())
if(x >= 0.5*a*a*b):
  t_theta = (2*b)/a - (2*x)/a**3
  print ((180 * np.arctan(t_theta)) / np.pi)
else:
  t_theta = (a*b*b) / (2*x)
  print ((180 * np.arctan(t_theta)) / np.pi)
h,a=map(int,input(),split())

n=h/a+1

print (int(n))

### FIXED CODE ###

import math
h,a=map(int,input().split())
print (math.ceil(h/a))
print(imput()**3)


### FIXED CODE ###

x = int(input())
print(x**3)
K = int(input())


if K%2 == 0:
	print(K/2)*(K/2)
else:
	print(K*K-1)/4


### FIXED CODE ###

k = int(input())

if k % 2 == 0:
    print((k//2)**2)
else:
    print((k//2)*((k//2)+1))
import math
a,b=map(int,input().split())
print(math.ceil(a/(s*b-1)))

### FIXED CODE ###

import math
a,b=map(int,input().split())
print(math.ceil(a/(2*b+1)))
a,b,c,d=map(int,input().split())
print(max(a*c,a*d,b*c,b*d))

### FIXED CODE ###

x=int(input())
if x==0:
  x=1
else:
  x=0
print(x)
n = int(input())
if n % 1000 == 0:
  return 0
return 1000 - (n % 1000)

### FIXED CODE ###

n = int(input())
x = n % 1000
if x == 0:
    print(x)
else:
    print(1000 - x)
a=input()
b=input()
c=input()
d=input()
e=input()
k=input()
array=[a,b,c,d,e]
flag=True

for i in range(5):
  for j in range(5):
    if array[i]-array[j] >= k:
      flag=False
      print(":(")
      break
  if not flag:
    break
      
if flag:
  print("Yay!")

### FIXED CODE ###

a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=int(input())
array=[a,b,c,d,e]
flag=True
 
for i in range(5):
  for j in range(5):
    if array[i]-array[j] > k:
      flag=False
      print(":(")
      break
  if not flag:
    break
      
if flag:
  print("Yay!")
N = int(input())
Problems = map(int, input().split())
M = int(input())
arr = []
for i in range(M):
	P, T = map(int, input().split())
    sum = 0
    for j in range(N):
      if j != P:
        sum += Problems[j]
      else:
        sum += T
    arr[i] = sum
for num in arr:
  print(num)

### FIXED CODE ###

N = int(input())
Problems = list(map(int, input().split()))
M = int(input())
arr = []
for i in range(M):
  P, T = map(int, input().split())
  sum = 0
  for j in range(N):
    if j != P - 1:
      sum += Problems[j]
    else:
      sum += T
  arr.append(sum)
for num in arr:
  print(num)
return ((T + 0.5) // A) * B 

### FIXED CODE ###

a, b, t = map(int, input().split())
print(int((t+0.5)//a*b))
N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
    print(x*A+y)
else:
    print(A*(X+1))


### FIXED CODE ###

N,A,B=map(int,input().split())
m=A+B
x=int(N/m)
y=int(N%m)
if y<=A:
    print(x*A+y)
else:
    print(A*(x+1))
import math

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

if M == 0:
    a = [-1 , N+1]
else :
    a = [-1] * (M+2)

    for i in range(1,M+1) :
        a[i] = int(input())

flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

fact = [0] * (M+2)

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        max2step = math.floor(length / 2) # 2段の回数
        count = 1
        for j in range(1,max2step+1) :
            if fact[j] != 0 :
                step2 = fact[j]
            else :
                step2 = math.factorial(j)
                fact[j] = step2
            if fact[length-2*j] != 0 :
                step1 = fact[length-2*j]
            else :
                step1 = math.factorial(length-2*j)
                fact[length-2*j] = step1
            if fact[length - j] != 0 :
                step3 = fact[length-j]
            else :
                step3 = math.factorial(length - j)
                fact[length - j] = step3
            count += step3 // step1 // step2
        ans *= count

    print(ans % 1000000007)
else :
    print(0)

### FIXED CODE ###

import math

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

if M == 0:
    a = [-1 , N+1]
else :
    a = [-1] * (M+2)

    for i in range(1,M+1) :
        a[i] = int(input())


flag = True # 可能かどうか
for i in range(0,M+1) :
    if a[i] + 1 == a[i+1] :
        flag = False
        break

fib = [1] * (N+1) # フィボナッチ数列
for i in range(2,N+1) :
    fib[i] = fib[i-1] + fib[i-2]

if flag :
    a[M+1] = N + 1

    ans = 1

    for i in range(M+1) :
        length = a[i+1] - a[i] - 2 # 上がる長さ
        ans *= fib[length]

    print(ans % 1000000007)
else :
    print(0)
n,m,k=map(int,input().split())
g=998244353
r=pow(m-1,n-1,g)
p=r
for i in range(1,k+1):
    r=(r*(n-i)*pow((m-1)*i,-1,g))%g
    p=(p+r)%g
print((m*p)%g)

### FIXED CODE ###

n,m,k=map(int,input().split())
g=998244353
r=1
p=pow(m-1,n-1,g)
for i in range(1,k+1):
    r=(r*(n-i)*pow(i,g-2,g))%g
    p=(p+r*pow(m-1,n-1-i,g))%g
print((m*p)%g)
from scipy.sparse import csr_matrix
from scipy.sparse.csgraph import dijkstra
import numpy as np

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

Us=[0]*M
Vs=[0]*M
As=[0]*M
Bs=[0]*M
for i in range(M):
    Us[i],Vs[i],As[i],Bs[i] = map(int,input().split())
    Us[i] -= 1
    Vs[i] -= 1

# ---
V={}
Ns = max(As)*N
Nv=N*(Ns+1)
cnt=0
for i in range(N):
    for ns in range(Ns+1):
        V[(i,ns)]=cnt
        cnt+=1

graph = np.zeros((Nv,Nv),dtype=np.int8)
if S > Ns:
    S = Ns

# U <-> V
for _ in range(M):
    u = Us.pop()
    v = Vs.pop()
    a = As.pop()
    b = Bs.pop()
    #
    for i in range(Ns+1): # i = 0,..,Ns
        ns_s = Ns - i
        ns_g = ns_s - a
        if ns_g >= 0:
            # U -> V
            graph[ V[(u,ns_s)], V[(v,ns_g)]] = b
            # V -> U
            graph[ V[(v,ns_s)], V[(u,ns_g)]] = b
            #print(u,v,a,b,ns_s,ns_g,V[(u,ns_s)],V[(v,ns_g)])

# -----

for i in range(N):
    c,d = map(int,input().split())
    for j in range(Ns): # j = 0,...,Ns-1
        ns_s = j
        ns_g = j + c
        if ns_g > Ns:
            ns_g = Ns
        graph[ V[(i,ns_s)], V[(i,ns_g)]] = d

s=V[(0,S)]
dist_matrix = dijkstra(csgraph=graph, directed=True, indices = s)

for i in range(1,N):
    ans = min([dist_matrix[i*(Ns+1)+v] for v in range(Ns+1)])
    print(int(ans))

### FIXED CODE ###

import math
import heapq

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

Us=[0]*M
Vs=[0]*M
As=[0]*M
Bs=[0]*M
for i in range(M):
    Us[i],Vs[i],As[i],Bs[i] = map(int,input().split())
    Us[i] -= 1
    Vs[i] -= 1

# ---
V={}
Ns = max(As)*N
Nv=N*(Ns+1)
cnt=0
for i in range(N):
    for ns in range(Ns+1):
        V[(i,ns)]=cnt
        cnt+=1

G=[[] for _ in range(Nv)]

if S > Ns:
    S = Ns

# U <-> V
for _ in range(M):
    u = Us.pop()
    v = Vs.pop()
    a = As.pop()
    b = Bs.pop()
    #
    for i in range(Ns+1): # i = 0,..,Ns
        ns_s = Ns - i
        ns_g = ns_s - a
        if ns_g >= 0:
            # U -> V
            G[ V[(u,ns_s)] ].append( (V[(v,ns_g)],b) )
            # V -> U
            G[ V[(v,ns_s)] ].append( (V[(u,ns_g)],b) )
            #print(u,v,a,b,ns_s,ns_g,V[(u,ns_s)],V[(v,ns_g)])

# -----

for i in range(N):
    c,d = map(int,input().split())
    for j in range(Ns): # j = 0,...,Ns-1
        ns_s = j
        ns_g = j + c
        if ns_g > Ns:
            ns_g = Ns
        G[ V[(i,ns_s)] ].append( (V[(i,ns_g)],d) )

# -----
D=[math.inf]*Nv
q=[]
# -----

s=V[(0,S)]
D[s] = 0
heapq.heappush(q,(0,s))

while len(q) > 0:
    p_cost,p_v = heapq.heappop(q)
    if D[p_v] < p_cost:
        continue
    for e_to,e_cost in G[p_v]:
        if D[ e_to ] > D[p_v] + e_cost:
            D[e_to] = D[p_v] + e_cost
            heapq.heappush(q, (D[e_to], e_to))

for i in range(1,N):
    ans = min([D[i*(Ns+1)+v] for v in range(Ns+1)])
    print(ans)
def main():
    n = int(input())
    xs = [int(c) for c in input().split()]
    l = int(input())

    xs.append(10 ** 17)
    nexts = list(range(n))
    for fr in range(n):
        p, q = fr, n
        while q - p > 1:
            m = (p + q) // 2
            if xs[m] - xs[fr] <= l:
                p = m
            else:
                q = m
        nexts[fr] = p

    doubling = [nexts]
    for _ in range(20):
        base = doubling[-1]
        nexts = [base[base_next] for base_next in base]
        doubling.append(nexts)

    def query(fr, to):
        if fr == to:
            return 0
        p, q = 0, 20
        while q - p > 1:
            m = (p + q) // 2
            if doubling[m][fr] > to:
                q = m
            else:
                p = m

        return query(doubling[p][fr], to) + 2 ** p

    q_count = int(input())
    for _ in range(q_count):
        a, b = map(int, input().split())
        if a > b:
            a, b = b, a
        a -= 1
        b -= 1

        print(query(a, b))


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    n = int(input())
    xs = [int(c) for c in input().split()]
    l = int(input())

    xs.append(10 ** 17)
    nexts = list(range(n))
    for fr in range(n):
        p, q = fr, n
        while q - p > 1:
            m = (p + q) // 2
            if xs[m] - xs[fr] <= l:
                p = m
            else:
                q = m
        nexts[fr] = p

    doubling = [nexts]
    for _ in range(20):
        base = doubling[-1]
        nexts = [base[base_next] for base_next in base]
        doubling.append(nexts)

    def query(fr, to):
        if fr >= to:
            return 0
        p, q = 0, 20
        while q - p > 1:
            m = (p + q) // 2
            if doubling[m][fr] >= to:
                q = m
            else:
                p = m
        return query(doubling[p][fr], to) + 2 ** p

    q_count = int(input())
    for _ in range(q_count):
        a, b = map(int, input().split())
        if a > b:
            a, b = b, a
        a -= 1
        b -= 1

        print(query(a, b))


if __name__ == '__main__':
    main()
from intetools import product

D,G=map(int,input().split())
p,c=[],[]

for _ in range(D):
  pi,ci=map(int,input().split())
  p.append(pi)
  c.append(ci)
  
ans=10**4
  
for cpls in product((range(2),repeat=D)):
  num=0#回答数
  tensu=0#各cplsの得点
  for i,v in enumerate(cpls,start=1):
    if v==1:
      tensu+=i*100*p[i-1]+c[i-1]
      num+=p[i-1]
  if tensu>=G:
    ans=min(ans,num)
    continue
  for i,v in reversed(list(enumerate(cpls,start=1))):
    if v==0:
      for j in range(1,p[i-1]):
        tesu+=j*100*p[i-1]
        num+=1
        if tensu>=G:
          ans=min(ans,num)
          break
print(ans)
      
  
  

### FIXED CODE ###

from itertools import product

D,G=map(int,input().split())
p,c=[],[]

for _ in range(D):
  pi,ci=map(int,input().split())
  p.append(pi)
  c.append(ci)
  
ans=10**4
  
for cpls in product(range(2),repeat=D):
  num=0#回答数
  tensu=0#各cplsの得点
  for i,v in enumerate(cpls,start=1):
    if v==1:
      tensu+=i*100*p[i-1]+c[i-1]
      num+=p[i-1]
  if tensu>=G:
    ans=min(ans,num)
    continue
  for i,v in reversed(list(enumerate(cpls,start=1))):
    if v==0:
      for _ in range(p[i-1]-1):
        tensu+=100*i
        num+=1
        if tensu>=G:
          ans=min(ans,num)
          break
print(ans)
def main():
    import sys
    import numpy as np
    ikimasu = sys.stdin.buffer.readline
    ini = lambda: int(ins())
    ina = lambda: list(map(int, ikimasu().split()))
    ins = lambda: ikimasu().strip()
    n,k = ina()
    tmp = [[] for _ in range(n)]
    for _ in range(n-1):
        x,x1=  ina()
        x-=1
        x1-=1
        tmp[x].append(x1)
        tmp[x1].append(x)
    def dfs(teiru,ta):
        rick = 1
        coulduse = k-1 if ta==-1 else k-2
        if(coulduse<len(tmp[teiru])):
            return 0
        for i in tmp[teiru]:
            if i == ta:
                continue
            rick*=coulduse
            rick%=1000000007
            coulduse-=1
            rick*=dfs(i,teiru) 
            rick%=1000000007
        return rick
    print(k*dfs(0,-1)%1000000007)
    

    


        
        
        


    
        


        


    




















if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    import sys
    sys.setrecursionlimit(311111)
    import numpy as np
    ikimasu = sys.stdin.buffer.readline
    ini = lambda: int(ins())
    ina = lambda: list(map(int, ikimasu().split()))
    ins = lambda: ikimasu().strip()
    n,k = ina()
    tmp = [[] for _ in range(n)]
    for _ in range(n-1):
        x,x1=  ina()
        x-=1
        x1-=1
        tmp[x].append(x1)
        tmp[x1].append(x)
    def dfs(teiru,ta):
        rick = 1
        coulduse = k-1 if ta==-1 else k-2
        for i in tmp[teiru]:
            if i == ta:
                continue
            rick*=coulduse
            rick%=1000000007
            coulduse-=1
            rick*=dfs(i,teiru) 
            rick%=1000000007
        return rick
    print(k*dfs(0,-1)%1000000007)
    

    


        
        
        


    
        


        


    




















if __name__ == "__main__":
    main()
temparr = input()
from heapq import heappush, heappop
temparr = temparr.split()
n = int(temparr[0])
edg = int(temparr[1])
dicts = {}
secdict = {}
firstdict = {}
for e in range(edg):
    temparr = input()
    temparr = temparr.split()
    edgearr = []
    for i in temparr:
        edgearr.append(int(i))
    first = int(edgearr[0])
    sec = int(edgearr[1])
    if first not in dicts:
        dicts[first] = []
    dicts[first].append(sec)
    if sec not in secdict:
        secdict[sec] = 1 
    if first not in firstdict:
        firstdict[first] = 1 
        

tail = []
ans = {}
for i in range(1, n + 1):
    if i not in firstdict:
        tail.append(i)
        ans[i] = 0

def dfs(node):
    global ans, dicts
    # if node in ans:
    #     return ans[node]
    if node not in  dicts:
        return 0  
    best = 0 
    for neigh in dicts[node]:
        curnew = dfs(neigh) + 1
        if curnew > best:
            best = curnew
    ans[node] = best 
    return best
ans2 = 0 
for i in range(1, n + 1):
    ans2 = max(dfs(i), ans2)
print(ans2)


### FIXED CODE ###

temparr = input()
from heapq import heappush, heappop

import sys
x=150000
sys.setrecursionlimit(x)
temparr = temparr.split()
n = int(temparr[0])
edg = int(temparr[1])
dicts = {}
secdict = {}
firstdict = {}
for e in range(edg):
    temparr = input()
    temparr = temparr.split()
    edgearr = []
    for i in temparr:
        edgearr.append(int(i))
    first = int(edgearr[0])
    sec = int(edgearr[1])
    if first not in dicts:
        dicts[first] = []
    dicts[first].append(sec)
    if first not in firstdict:
        firstdict[first] = 1 
tail = []
ans = {}

for i in range(1, n + 1):
    if i not in firstdict:
        tail.append(i)
        ans[i] = 0
        
def dfs(node):
    global ans, dicts
    if node in ans:
        return ans[node]
    if node not in  dicts:
        return 0  
    best = 0 
    for neigh in dicts[node]:
        curnew = dfs(neigh) + 1
        if curnew > best:
            best = curnew
    ans[node] = best 
    return best
ans2 = 0 
for i in range(1, n + 1):
    ans2 = max(dfs(i), ans2)
print(ans2)
x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
for s in c:
  if chk:
    break
  for i in range(1000):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  if s <1000:    
    for p in range(s,1000):
      j = -1*p
      #print(s,(j+s)**5-j**5)
      if (j+s)**5-j**5 > x:
        break 
      if (j+s)**5-j**5 == x:
        ans = (j+s,j)
        chk = True
        break 
  for ww in range(1,(s+1)//2):
    jj = -1*ww
    if (jj+s)**5-jj**5 > x:
      break    
    if (jj+s)**5-jj**5 == x:
      ans = (jj+s,jj)
      chk = True
      break 
print(*ans)


### FIXED CODE ###

x = int(input())
if x == 1:
  print(0,-1)
  exit()
  
def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a

c = []
fct = factorize(x)
for div in divisorize(fct):
    c.append(num(div))
    
chk = False
for s in c:
  if chk:
    break
  for i in range(1000):
    if (i+s)**5-i**5 > x:
      break
    if (i+s)**5-i**5 == x:
      ans = (i+s,i)
      chk = True
      break
  if s <1000:    
    for p in range(s,1000):
      j = -1*p
      #print(s,(j+s)**5-j**5)
      if (j+s)**5-j**5 > x:
        break 
      if (j+s)**5-j**5 == x:
        ans = (j+s,j)
        chk = True
        break 
  for ww in range(1,(s+1)//2)[::-1]:
    jj = -1*ww
    if (jj+s)**5-jj**5 > x:
      break    
    if (jj+s)**5-jj**5 == x:
      ans = (jj+s,jj)
      chk = True
      break 
print(*ans)
x,k,d=map(int,input().split())
x1=abs(x)%d
x2=abs(abs(x1)-d)
num=abs(x)//d
if((k-num)>=0):
	if((k-num)%2==0):
    	print(x1)
	else:
    	print(x2)
else:
   print(abs(x)-k*d)

### FIXED CODE ###

x,k,d=map(int,input().split())
x1=abs(x)%d
x2=abs(abs(x1)-d)
num=abs(x)//d
if((k-num)>=0):
    if((k-num)%2==0):
        print(x1)
    else:
        print(x2)
else:
    print(abs(x)-k*d)
import sys
if __name__ == "__main__":
    input = sys.stdin.readline()
    input = input.strip()
    input = input.split(" ")
    result = ""
    for i in input:
        result += i[0].upper()
    return result

### FIXED CODE ###

strs = raw_input()
strs = strs.split()
print strs[0][0].upper() + strs[1][0].upper() + strs[2][0].upper()
a = int(input())
b = int(input())
if a == 1 and b == 1:
  print(0)
elif a*b % 2 == 0:
  print(a*b // 2)
else:
  print(a*b // 2 + 1)

### FIXED CODE ###

h,w=map(int,input().split())
if h==1 or w==1:
  print(1)
else:
  print((h*w+1)//2)
def triple(n):
    if n >= 1:
        if n <= 100:
            n = n * 3
        return n
        
    
print(triple(x))


### FIXED CODE ###

x = int(input())
print(x*x*x)
a, b, k = [int(i) for i in input().split()]
if k <= 0:
    taka = a
    aoki = b
elif k <= a:
    taka = a-k
    aoki = b
elif k > a && k <= a+b:
    taka = 0
    aoki = b-(k-a)
elif k > a+b:
    taka = 0
    aoki = 0
print(taka, aoki)


### FIXED CODE ###

a, b, k = [int(i) for i in input().split()]
if k <= 0:
    taka = a
    aoki = b
elif k <= a:
    taka = a-k
    aoki = b
elif k > a and k <= a+b:
    taka = 0
    aoki = b-(k-a)
elif k > a+b:
    taka = 0
    aoki = 0
print(taka, aoki)
import math
A,B = map(int,input().split())
gcd = math.gcd(A,B)
C = []
for i in range(1,gcd+1):
    if i*i>gcd:break
    if gcd%i==0:
        C.append(i)
        if i!=gcd//i:
            C.append(gcd//i)
def is_prime(n):
    if n==1:return True
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:return False
    return True
cnt = 0
for c in C:
    if is_prime(c):cnt+=1
print(cnt)

### FIXED CODE ###

import math,sys
sys.setrecursionlimit(1000000)
def mygcd(x,y):
    if x<y:x,y=y,x
    if y==0:return x
    return mygcd(y,x%y)
def is_prime(n):
    if n==1:return True
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:return False
    return True
A,B = map(int,input().split())
gcd = mygcd(A,B)
C = []
for i in range(1,gcd+1):
    if i*i>gcd:break
    if gcd%i==0:
        C.append(i)
        if i!=gcd//i:
            C.append(gcd//i)
cnt = 0
for c in C:
    if is_prime(c):cnt+=1
print(cnt)
x,y = map(int,input().split())
A=[int(input())  for i in range(x)]
T=sum(A)
a=0
for i in range(x):
  if A[i]<1/(4*T):
    a+=1
if a>=y:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

x,y = map(int,input().split())
A=list(map(int,input().split()))
T=sum(A)
a=0
for i in range(x):
  if A[i]>=T/(4*y):
    a+=1
if a>=y:
    print('Yes')
else:
    print('No')
def gcd(a,b):
    if a%b==0:
        return b
    return gcd(b,a%b)

N=int(input())
v=[list(map(int,input().split())) for _ in range(N)]
d={}

for i in range(1,N):
    for j in range(i):
        if i!=j:
            x=v[i][0]-v[j][0]
            y=v[i][1]-v[j][1]
            if x<0:
                x*=-1
                y*=-1
            if x!=0 and y!=0:
                g=gcd(x,abs(y))
            elif x==0 and y!=0:
                g=y
            else:
                g=x
            x//=g
            y//=g
            V=str(x)+","+str(y)
            if V in d:
                d[V]+=1
            else:
                d[V]=1
M=0
for D in d:
    M=max(M,d[D])
for D in d:
    if d[D]==M:
        ans=N-d[D]
        break
if ans==0:
    ans+=1
print(ans)

### FIXED CODE ###

N=int(input())
x=[list(map(int,input().split())) for _ in range(N)]

v={}
for i in range(N):
    for j in range(N):
        if i==j:
            continue
        vect=[x[i][0]-x[j][0],x[i][1]-x[j][1]]
        vs=str(vect[0])+","+str(vect[1])
        if vs in v:
            v[vs]+=1
        else:
            v[vs]=1

VM=0
for m in v:
    VM=max(VM,v[m])
print(N-VM)
n=int(input())
m=int(input())
print((n*(n-1)+m*(m-1))//2)


### FIXED CODE ###

n,m=map(int,input().split())
print((n*(n-1)+m*(m-1))//2)