Harryxun/stf_run huggingface dataset:
import sys

for line in sys.stdin:
    count = 0
    n = int(line)
    
    nums = range(2, n+1)
    
    while True:
        if len(nums) == 0:
            break
        if len(nums) == 1:
            count += 1
            break
        else:
            count += 1
            m = nums[0]
            numsCandidate = nums[1:]
            nums = [ for x in numsCandidate if x % m != 0 ]
    print count

### FIXED CODE ###

import math
import sys

n = 999999
nums = [1] * (n+1)
nums[:2] = [0,0]
    
cnt = 0
while cnt <= math.sqrt(n):
    flg = nums[cnt]
    if flg == 1:
        k = 2
        while k*cnt <= n:
            nums[k*cnt] = 0
            k += 1
    cnt += 1


for line in sys.stdin:
    n = int(line)
    print sum(nums[:n+1])
import sys
from itertools import product

def main():
    input = sys.stdin.readline
    X, Y, Z, K = map(int, input().split())
    A = list(map(int, input().split()))
    B = list(map(int, input().split()))
    C = list(map(int, input().split()))

    A = sorted(A, key=lambda x: -x) + [-10**9]
    B = sorted(B, key=lambda x: -x) + [-10**9]
    C = sorted(C, key=lambda x: -x) + [-10**9]

    diffA = [A[i] - A[i+1] for i in range(X)]
    diffB = [B[i] - B[i+1] for i in range(Y)]
    diffC = [C[i] - C[i+1] for i in range(Z)]

    A_ = [A[0]]
    B_ = [B[0]]
    C_ = [C[0]]
    i, j, k = 0, 0, 0
    while (len(A_) * len(B_) * len(C_)) < 10**5:
        a, b, c = diffA[i], diffB[j], diffC[k]

        if min(a, b, c) >= 10**4:
            break

        if a == min(a, b, c):
            A_.append(A[i+1])
            i += 1
        if b == min(a, b, c):
            B_.append(B[j+1])
            j += 1
        if c == min(a, b, c):
            C_.append(C[k+1])
            k += 1

    deli= []
    for a in A_:
        for b in B_:
            for c in C_:
                deli.append(a + b + c)

    deli = sorted(deli, key=lambda x: -x)
    for i in range(K):
        print(deli[i])


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from heapq import heappush, heappop

def main():
    input = sys.stdin.readline
    X, Y, Z, K = map(int, input().split())
    A = sorted(list(map(int, input().split())), key=lambda x: -x)
    B = sorted(list(map(int, input().split())), key=lambda x: -x)
    C = sorted(list(map(int, input().split())), key=lambda x: -x)

    deli = []
    heappush(deli, (-A[0]-B[0]-C[0], 0, 0, 0))
    pushed = set((0,0,0))
    for _ in range(K):
        d = heappop(deli)
        i, j, k = d[1], d[2], d[3]

        if i+1 < X and (i+1, j, k) not in pushed:
            heappush(deli, (-A[i+1]-B[j]-C[k], i+1, j, k))
            pushed.add((i+1, j, k))

        if j+1 < Y and (i, j+1, k) not in pushed:
            heappush(deli, (-A[i]-B[j+1]-C[k], i, j+1, k))
            pushed.add((i, j+1, k))

        if k+1 < Z and (i, j, k+1) not in pushed:
            heappush(deli, (-A[i]-B[j]-C[k+1], i, j, k+1))
            pushed.add((i, j, k+1))

        print(-d[0])


if __name__ == '__main__':
    main()
n = int(input())

if n == 1:
  print(1)

elif n == 2:
  print(0.5)
  
elif n%2 == 0:
  print(0.5)
  
else:
  print((n+1)/2n)

### FIXED CODE ###

n = int(input())
 
if n == 1:
  print(1)
 
elif n == 2:
  print(0.5)
  
elif n%2 == 0:
  print(0.5)
  
else:
  print((n+1)/2/n)
import sys

N, M, L = list(map(int, sys.stdin.readline().strip().split(" ")))
INF = 10**10

def warshall_floyd(g_mat):
    dp = [[INF for _ in range(N)] for _ in range(N)]
    for k in range(N):
        for i in range(N):
            for j in range(N):
                dp[i][j] = min(dp[i][j], dp[i][k]+dp[k][j])
    return dp

graph = [[INF for _ in range(N)] for _ in range(N)]

for _ in range(M):
    a, b, c = list(map(int, sys.stdin.readline().strip().split(" ")))
    graph[a-1][b-1] = c
    graph[b-1][a-1] = c

dist_graph = warshall_floyd(graph)
bool_graph = [[INF for _ in range(N)] for _ in range(N)]

for i in range(N):
    for j in range(N):
        if dist_graph[i][j] <= L:
            bool_graph[i][j] = 1

ans_graph = warshall_floyd(bool_graph)

Q = int(sys.stdin.readline().strip())
for _ in range(Q):
    s, t = list(map(int, sys.stdin.readline().strip().split(" ")))
    ans = ans_graph[s][t]
    print(ans if ans != INF else -1)

    


### FIXED CODE ###

import sys
import copy

N, M, L = list(map(int, sys.stdin.readline().strip().split(" ")))
INF = 10**10

def warshall_floyd(g_mat):
    dp = copy.copy(g_mat)
    
    for k in range(N):
        for i in range(N):
            for j in range(N):
                dp[i][j] = min(dp[i][j], dp[i][k]+dp[k][j])
    return dp

graph = [[INF for _ in range(N)] for _ in range(N)]

for _ in range(M):
    a, b, c = list(map(int, sys.stdin.readline().strip().split(" ")))
    graph[a-1][b-1] = c
    graph[b-1][a-1] = c

dist_graph = warshall_floyd(graph)
bool_graph = [[INF for _ in range(N)] for _ in range(N)]

for i in range(N):
    for j in range(N):
        if dist_graph[i][j] <= L:
            bool_graph[i][j] = 1

ans_graph = warshall_floyd(bool_graph)

Q = int(sys.stdin.readline().strip())
for _ in range(Q):
    s, t = list(map(int, sys.stdin.readline().strip().split(" ")))
    ans = ans_graph[s-1][t-1]
    print(ans-1 if ans != INF else -1)
import numpy as np
N = int(input())

edge = np.zeros((N,N))
color = [0] * (N)

for i in range(N-1) :
    u , v , w = map(int,input().split())
    edge[u-1,v-1] = w
    edge[v-1,u-1] = w

stack = [(0,0)] # (頂点 , 距離)

while len(stack) > 0 :
    v , d = stack.pop()

    print(v+1)

    if d % 2 == 0 :
        color[v] = 1
    else :
        color[v] = 0

    for u , w in enumerate(edge[v]) :
        if w > 0 and color[u] == 0 :
            stack.append((u,d+w))

for i in color :
    print(i)

### FIXED CODE ###

from collections import deque

N = int(input())

edge = [[] for _ in range(N)]
check = [False] * N
dist = [0] * N

for i in range(N-1) :
    u , v , w = map(int,input().split())
    edge[u-1].append((v-1,w))
    edge[v-1].append((u-1,w))

q = deque([0])

while q :
    current = q.popleft()
    if check[current] :
        continue

    check[current] = True
    for ad , w in edge[current] :
        if not check[ad] :
            q.append(ad)
            dist[ad] = dist[current] + w

for w in dist :
    print(w % 2)
lass UnionFind:
  def __init__(self, n):
    self.parent = [-1] * n
    self.rank = [1] * n
    self.count = [1] * n

  def get_root(self, i):
    if self.parent[i] == i:
      return i
    else:
      self.parent[i] = self.get_root(self.parent[i])
      return self.parent[i]
    #while self.parent[i] != -1:
    #  i = self.parent[i]
    #return i

  def is_same_tree(self, i, j):
    return self.get_root(i) == self.get_root(j)

  def merge(self, i, j):
    i = self.get_root(i)
    j = self.get_root(j)
    if i == j:
      return

    if self.rank[i] > self.rank[j]:
      self.parent[j] = i
      self.rank[i] = max(self.rank[i], self.rank[j] + 1)
      self.count[i] += self.count[j]
    else:
      self.parent[i] = j
      self.rank[j] = max(self.rank[j], self.rank[i] + 1)
      self.count[j] += self.count[i]


n, m = map(int, input().split())
uf = UnionFind(n)
for _ in range(m):
  a, b = [int(i) - 1 for i in input().split()]
  uf.merge(a, b)
print(max(uf.count))


### FIXED CODE ###

class UnionFind:
    def __init__(self, n):
        self.parent = [-1] * n
        self.rank = [1] * n
        self.count = [1] * n
 
    def get_root(self, i):
        while self.parent[i] != -1:
            i = self.parent[i]
        return i
 
    def is_same_tree(self, i, j):
        return self.get_root(i) == self.get_root(j)
 
    def merge(self, i, j):
        i = self.get_root(i)
        j = self.get_root(j)
        if i == j:
            return
 
        if self.rank[i] > self.rank[j]:
            self.parent[j] = i
            self.rank[i] = max(self.rank[i], self.rank[j] + 1)
            self.count[i] += self.count[j]
        else:
            self.parent[i] = j
            self.rank[j] = max(self.rank[j], self.rank[i] + 1)
            self.count[j] += self.count[i]
n, m = map(int, input().split())
uf = UnionFind(n)
for _ in range(m):
  a, b = [int(i) - 1 for i in input().split()]
  uf.merge(a, b)
print(max(uf.count))
a,b = map(int,input().split())
if a >12:print(b)
else if a <6:print(b//2)
else: print(0)

### FIXED CODE ###

a,b = map(int,input().split())
if a >12:print(b)
elif a >5:print(b//2)
else: print(0)
N, S = map(int, input().split())
A = list(map(int, input().split()))
m = 0
var1 = [0] * (S + 1)
var1[0] = pow(2, N, 998244353)
var2 = pow(2, 998244353 - 2, 998244353)
def func1(xxx, xx):
    if xxx>xx:
        return xx
    else:
        return xxx
for all in A:
    m = all+m
    funcvar1=min(S, m)
    for val in reversed(range(all,funcvar1+1)):
        var1[val] = (var1[val] + var1[val - all] * var2) % 998244353
print(var1[S])

### FIXED CODE ###

a,b = [int(num) for num in input().split()]
print(a*b)
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   z = [0 for k in range(b+1)]
   for i in range(lenx):
      a = x[i]
      b = z + []
      for j in xrange(leny):
         if a == y[i]:
               z[j+1] = b[j] + 1
         elif z[j+1] < z[j]:
               z[j+1] = z[j]
               
   print max(z)

n = input()
for i in xrange(n):
   solve()

### FIXED CODE ###

def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()
S = input()
K = int(input())

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    list = []
    for i in range(len(arr)):
        if arr[i] != '1':
            list.append(int(arr[i]))
    return list[0]
            

if len(S) > K:
    if check_one(K,S):
        print(1)
else:
    print(first_num(S))
    

### FIXED CODE ###

S = input()
K = int(input())

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    list = []
    for i in range(len(arr)):
        if arr[i] != '1':
            list.append(int(arr[i]))
    return list[0]
            

if len(S) >= K and check_one(K,S):
        print(1)
else:
    print(first_num(S))
X = A + B - C
if X >= 0:
    print(X)
else:
    print(0)

### FIXED CODE ###

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

X = b + c - a
if X >= 0:
    print(X)
else:
    print(0)
import sys
# 再帰制限に引っかかった場合に外す
# import sys
sys.setrecursionlimit(100000)
nCr = {}
def cmb(n, r):
    if r == 0 or r == n: return 1
    if r == 1: return n
    if (n,r) in nCr: return nCr[(n,r)]
    nCr[(n,r)] = cmb(n-1,r) + cmb(n-1,r-1)
    return nCr[(n,r)]

inf = input().split()
N = int(inf[0])
K = int(inf[1])
M = N-K
for i in range(1,K+1):
  red = cmb(M+1,i)
  blue = cmb(K-1,i-1)
  print(red*blue%(10**9+7))


### FIXED CODE ###

from operator import mul
from functools import reduce
 
def cmb(n,r):
    r = min(n-r,r)
    if r==0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

inf = input().split()
N = int(inf[0])
K = int(inf[1])
M = N-K
for i in range(1,K+1):
  if M+1<i:
    red = 0
  else:
    red = cmb(M+1,i)
  blue = cmb(K-1,i-1)
  print(red*blue%(10**9+7))
A,B=map(int,input().split())
if A>=B:
    x,y=A,B
else:
    x,y=B,A
i=1
while if x*i%y==0:
    i+=1
print(x*i)

### FIXED CODE ###

A,B=map(int,input().split())
if A>B:
    x,y=A,B
else:
    x,y=B,A
i=1
while x*i%y!=0:
    i+=1
print(x*i)
N, A = map(int, input().split())
x = [int(i) for i in input().split()]
ans = 0
X = max(x)
dp = [[[0]*(X*N+1) for j in range(N+1)] for k in range(N+1)]
dp[0][0][0] = 1 
for j in range(1,N+1):
  for k in range(N+1):
    for s in range(X*N+1):
      dp[j][k][s] = dp[j-1][k][s]
      if s>=x[j-1]:
        dp[j][k][s] += dp[j-1][k-1][s-x[j-1]]
for k in range(1,N+1):
  ans += dp[N][k][k*A]
print(ans)

### FIXED CODE ###

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

table = [[[0]*(N*A+1) for i in range(N+1)] for j in range(N+1)]
table[0][0][0] = 1

for j in range(1,N+1):
  for k in range(N+1):
    for s in range(N*A+1):
      c = x[j-1]
      if s-c<0:
        table[j][k][s] = table[j-1][k][s]
      elif s-c>=0 and k>=1:
        table[j][k][s] = table[j-1][k][s] + table[j-1][k-1][s-c]
      
ans = 0
for i in range(1,N+1):
  ans += table[N][i][i*A]
print(ans)
import sys
sys.setrecursionlimit(10**9)

f_memo = {0:1, 1:1}
def f(x):
  global f_memo
  if x in f_memo:
    return f_memo[x]
  else:
    res = x * f(x-1)
    f_memo[x] = res
    return res

comb_memo = {}
def comb(n, r):
  global comb_memo
  if (n, r) in comb_memo:
    return comb_memo[(n, r)]
  else:
    a = f(n)
    b = f(n-r)
    c = f(r)
    res = a // b // c
    comb_memo[(n, r)] = res
    return res


N, A, B = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

mu = sum(v[:A]) / A
R = A-1
for i in range(A, N):
  if v[i] == mu:
    R = i
  else:
    break

R += 1
ans = 0
if R > A:
  for i in range(A, B+1):
    ans += comb(R, i)
else:
  min_v = v[A-1]
  n = v.count(min_v)
  need = v[:A].count(min_v)
  ans += comb(n, need)

print(mu)
print(ans)

### FIXED CODE ###

comb_memo = {}
def comb(n, r):
  global comb_memo
  if (n, r) in comb_memo:
    return comb_memo[(n, r)]
  else:
    r = min(r, n-r)
    res = 1
    for _ in range(r):
      res *= n
      n -= 1
    for i in range(1, r+1):
      res //= i
    comb_memo[(n, r)] = res
    comb_memo[(n, n-r)] = res
    return res

N, A, B = map(int, input().split())
v = list(map(int, input().split()))
v.sort(reverse=True)

mu = sum(v[:A]) / A
ans = 0
if v[0] == mu:
  R = v.count(v[0])
  for i in range(A, B+1):
    if i > R:
      break
    ans += comb(R, i)
else:
  min_v = v[A-1]
  n = v.count(min_v)
  need = v[:A].count(min_v)
  ans += comb(n, need)

print(mu)
print(ans)
from copy import copy
def main():
    n = int(input().rstrip())
    sqrt_n = int(sqrt(n))
    primes = get_primes(sqrt_n)
    
    candidates = [1]
    for prime in primes:
        count = 0
        remain = n
        while remain % prime == 0:
            count += 1
            remain = remain // prime
        if count > 0:
        
            next_candidates = copy(candidates)
            for candidate in candidates:
                temp_candidate = candidate
                for i in range(count):
                    temp_candidate *= prime
                    #if temp_candidate > sqrt_n:
                    #    break
                    next_candidates.append(temp_candidate)
            candidates = next_candidates
    
    total = 0
    for number in candidates:

        remain = n - number
        x, y = divmod(remain, number)
        #print(x, y, remain, number)
        if y == 0 and x > number:
            #print("○",number)
            total += x
        #elif y == 0:
        #    print("×",number)

    print(total)

if __name__ == "__main__":
  main()


### FIXED CODE ###

from math import sqrt
def main():
    n = int(input().rstrip())
    sqrt_n = int(sqrt(n))

    total = 0
    for number in range(1,sqrt_n + 1):
        if n % number > 0:
            continue
        remain = n - number
        x, y = divmod(remain, number)
        #print(x, y, remain, number)
        if y == 0 and x > number:
            #print("○",number)
            total += x
        #elif y == 0:
        #    print("×",number)

    print(total)

if __name__ == "__main__":
  main()
n, d=int(input().split())
cnt=1
while True:
  if (2*d+1)*cnt>=n:
    print(cnt)
    break
  
  cnt+=1
  
  

### FIXED CODE ###

n, d=input().split()
ni=int(n)
di=int(d)
cnt=1
while True:
  if (2*di+1)*cnt>=ni:
    print(cnt)
    break
  
  cnt+=1
N = int(input())
ga, sa, ba = map(int, input().split())
gb, sb, bb = map(int, input().split())
metal = [(ga, gb), (sa, sb), (ba, bb)]
metal.sort(reverse = True, key = lambda x:x[1]-x[0])
ga, gb = metal[0]
sa, sb = metal[1]
ba, bb = metal[2]
if ba<=bb:
    print(1/0)
    res = 0
    for i in range(N//ga+1):
        for j in range((N-i*ga)//sa+1):
            k = (N-i*ga-j*sa)//ba
            tmp = k*bb+j*sb+i*gb+(N-i*ga-j*sa-k*ba)
            res = max(res, tmp)
elif sa<=sb:
    res = 0
    for i in range(N//ga+1):
        j = (N-i*ga)//sa
        tmp = gb*i+sb*j+(N-i*ga-sa*j)
        res = max(res, tmp)
    k = res//bb
    res += (ba-bb)*k
elif ga<=gb:
    i = N//ga
    N+=i*(gb-ga)
    res = 0
    for i in range(N//sb):
        j = (N-i*sb)//bb
        tmp = i*sa+j*ba+(N-i*sb-j*bb)
        res = max(res, tmp)
else:
    res = 0
    ga, gb = gb, ga
    sa, sb = sb, sa
    ba, bb = bb, ba
    for i in range(N//ga+1):
        for j in range((N-i*ga)//sa+1):
            k = (N-i*ga-j*sa)//ba
            tmp = k*bb+j*sb+i*gb+(N-i*ga-j*sa-k*ba)
            res = max(res, tmp)
print(res)


            


### FIXED CODE ###

N = int(input())
ga, sa, ba = map(int, input().split())
gb, sb, bb = map(int, input().split())
metal = [(ga, gb), (sa, sb), (ba, bb)]
metal.sort(reverse = True, key = lambda x:x[1]-x[0])
ga, gb = metal[0]
sa, sb = metal[1]
ba, bb = metal[2]
if ba<=bb:
    res = N
    for i in range(N//ga+1):
        for j in range((N-i*ga)//sa+1):
            k = (N-i*ga-j*sa)//ba
            tmp = k*bb+j*sb+i*gb+(N-i*ga-j*sa-k*ba)
            res = max(res, tmp)
elif sa<=sb:
    res = N
    for i in range(N//ga+1):
        j = (N-i*ga)//sa
        tmp = gb*i+sb*j+(N-i*ga-sa*j)
        res = max(res, tmp)
    k = res//bb
    res += (ba-bb)*k
elif ga<=gb:
    i = N//ga
    N+=i*(gb-ga)
    res = N
    for i in range(N//sb+1):
        j = (N-i*sb)//bb
        tmp = N+(sa-sb)*i+(ba-bb)*j
        res = max(res, tmp)
else:
    res = N
    ga, gb = gb, ga
    sa, sb = sb, sa
    ba, bb = bb, ba
    for i in range(N//ga+1):
        for j in range((N-i*ga)//sa+1):
            k = (N-i*ga-j*sa)//ba
            tmp = k*bb+j*sb+i*gb+(N-i*ga-j*sa-k*ba)
            res = max(res, tmp)
print(res)
from numba import jit
import numpy as np

@jit
def solve():
    
    s = np.array(list(input())[::-1])
    num = len(s)
    #print(s, num)
    
    l = np.array([])
    for i in range(1,num+1):
        l.append(int(''.join(s[:i][::-1])))
    #print(l)
    
    mod = []
    for j in range(num):
        mod.append(l[j] % 2019)
    mod = np.array(mod)
    
    ans = 0
    for p in range(num):
        if mod[p] == 0:
            ans += 1
        tmp = 1
        for q in range(p+1,num):
            if mod[p] == mod[q]:
                tmp += 1
        ans += (tmp-1)*tmp//2
    
    print(ans)

solve()

### FIXED CODE ###

s = input()[::-1]

cnts = [1] + [0] * (2019 - 1)
tmp = 0
d = 1

for i in s:
    tmp += int(i) * d
    cnts[tmp % 2019] += 1
    d = d * 10 % 2019 # 桁数が大きくなりすぎる → 10と2019が素だから可能

ans = 0
for cnt in cnts:
    ans += (cnt - 1) * cnt // 2

print(ans)
sentence = input()

d = {}
for i in range(97,97+26):
    d[chr(i)] = 0

for char in sentence:
    if char.isalpha():
        d[char] += 1
for key, value in sorted(d.items()):
    print('%s : %s' % (key, value))

### FIXED CODE ###

import sys
sentence = ''
data = 'abcdefghijklmnopqrstuvwxyz'
for line in sys.stdin:
    sentence += line.lower()
for i in data:
    print(i + ' : ' + str(sentence.count(i)))
print(float(input()) * float(input())


### FIXED CODE ###

inp = input().split()
print(int(inp[0]) * int(inp[1]), int(inp[0]) + int(inp[1]) + int(inp[0]) + int(inp[1]))
N = int(input())
V = [int(n) for n in input().split(" ")]
C = [int(n) for n in input().split(" ")]
ret = 0
for i in range(N):
    if V[i] - C[i] > 0:
        ret += V[i] - C[i]

print(ret)



### FIXED CODE ###

input = input()
sp_input = input.split(" ")
A = int(sp_input[0])
B = int(sp_input[1])
T = int(sp_input[2]) + 0.5
a = A

ret = 0
i = B
while a <= T:
  ret += B
  a += A

print(ret)
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if x1 == x2 and x3 == x4:
        print("YES")
    elif (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3):
        print("YES")
    else:
        print("NO")

### FIXED CODE ###

n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if x1 == x2 and x3 == x4:
        print("YES")
    elif x1 == x2 or x3 == x4:
        print("NO")
    elif abs((y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3)) < 1e-10:
        print("YES")
    else:
        print("NO")
while True:
(a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]

if op == '?':
break
elif op =='+':
print(a + b)
elif op == '-':
print(a - b)
elif op == '*':
print(a * b)
elif op == '/':
print(a // b)

### FIXED CODE ###

while True:
    (a, op, b) = [int(i) if i.isdigit() else i for i in input().split()]
    if op == '?':
        break
    elif op =='+':
        print(a + b)
    elif op == '-':
        print(a - b)
    elif op == '*':
        print(a * b)
    elif op == '/':
        print(a // b)
import sys

for line in sys.stdin:
    a, b = sorted(map(int, line.split(' ')))
    gcd = 1
    div = 2
    while a >= div:
        amod, bmod = a % div, b % div
        if amod == 0 and bmod == 0;
            gcd *= div
            a, b = a/div, b/div
            continue
        else:
            div += 2
    lcm = gcd * a * b
    print gcd, lcm

### FIXED CODE ###

import sys

for line in sys.stdin:
    a, b = sorted(map(int, line.split(' ')))
    gcd = 1
    d = 2
    while a >= d:
        amod, bmod = a % d, b % d
        if amod == 0 and bmod == 0:
            gcd *= d
            a, b = a/d, b/d
            d = 2
            continue
        else:
            d += 1
    lcm = gcd * a * b
    print gcd, lcm
N = int(input())
l = list(map(int,input().split()))
l.sort()
for i in range(N - 2):
    for j in range(i + 1,N - 1):
        for k in range(j + 1, N ):
            if l[i] < l[j] + l[k]:
                ans += 1
print(ans)

### FIXED CODE ###

import bisect
N = int(input())
l = list(map(int,input().split()))
l.sort()
#print(l)


ans = 0
for i in range(N - 1 , 1, -1):
    for j in range(i - 1 , 0 , -1):
        #work = l[:j]
        x = l[i] - l[j]
        #idx = bisect.bisect_right(work, x)
        idx = bisect.bisect_right(l, x)
        ans += max(j - idx , 0)
print(ans)
n=int(input())
for i in range(8):
  if 2**i > n:
    print(2**(i-1))
    return

### FIXED CODE ###

n=int(input())
for i in range(8):
  if 2**i > n:
    print(2**(i-1))
    break
a, b = input().split(' ')
c = int(a) + int(b)
if a%3==0 or b%3==0 or c%3==0:
  print("Possible")
else:
  print("Impossible")

### FIXED CODE ###

a, b = map(int, input().split(" "))
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 == 0:
  print("Possible")
else:
  print("Impossible")
n = int(input())
a = int(input())
b = int(input())
print('Hello world' if n == 1 else a + b)

### FIXED CODE ###

n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a + b)
import math
r=int(input())
print("{:.5f} {:.5f}".format(r*r*math.pi,r*2*pi))



### FIXED CODE ###

from math import pi
r=float(input())
print("{:.5f} {:.5f}".format(r*r*pi,r*2*pi))