Harryxun/stf_run huggingface dataset:
import numpy as np

S      = input()
S      = S.split()
N      = int(S[0])
D      = int(S[1])
matrix = np.zeros([N, D])
count  = 0


for i in range(0, N, 1):
    X_vector = input()
    X_vector = X_vector.split()
    for j in range(0, D, 1):
        matrix[i][j] = int(X_vector[j])

for i in range(0, N, 1):
    a_vector = matrix[i]
    for j in range(i+1, N, 1):
        b_vector = matrix[j]
        length = np.linalg.norm(b_vector-a_vector)
        if isinstance(length, int):
            count++
print(count)


### FIXED CODE ###

import numpy as np

S      = input()
S      = S.split()
N      = int(S[0])
D      = int(S[1])
matrix = np.zeros([N, D])
count  = 0


for i in range(0, N, 1):
    X_vector = input()
    X_vector = X_vector.split()
    for j in range(0, D, 1):
        matrix[i][j] = int(X_vector[j])

for i in range(0, N, 1):
    a_vector = matrix[i]
    for j in range(i+1, N, 1):
        b_vector = matrix[j]
        length = np.linalg.norm(b_vector-a_vector)
        if length.is_integer():
            count = count + 1
print(count)
n=int(input())
a=map(int,input().split())
i=1
for k in a:
  if k==i: i+=1
print(N-i+1 if i>1 else -1)

### FIXED CODE ###

N=int(input())
A=map(int,input().split())
i=1
for a in A:
  if a==i: i+=1
i-=1
print(N-i if i>0 else -1)
n = int(input())
g = [[] for _ in range(n+1)]
for _ in range(n-1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)
a = []
def f(i, p):
    a.append(i)
    if i == n:
        return True
    for j in g[i]:
        if j != p:
            if f(j, i):
                return True
    a.pop()
f(1,0)
m = (len(a)+1) // 2
def h(i, j, p):
    if i == j:
        return 1
    return 1 + sum(h(k, j, i) for k in g[i] if k != p)
if h(1, a[m], 0) > h(n, a[m-1], 0):
    print("Fennec")
else:
    print("Snuke")

### FIXED CODE ###

import sys
sys.setrecursionlimit(sys.getrecursionlimit()*1000)
n = int(input())
g = [[] for _ in range(n+1)]
for _ in range(n-1):
    a, b = map(int, input().split())
    g[a].append(b)
    g[b].append(a)
a = []
def f(i, p):
    a.append(i)
    if i == n:
        return True
    for j in g[i]:
        if j != p:
            if f(j, i):
                return True
    a.pop()
f(1,0)
m = (len(a)+1) // 2
def h(i, j, p):
    if i == j:
        return 1
    return 1 + sum(h(k, j, i) for k in g[i] if k != p)
if h(1, a[m], 0) > h(n, a[m-1], 0):
    print("Fennec")
else:
    print("Snuke")
b = input()
if b = 'A':
  print("T")
elif b = 'T':
  print("G")
elif b = 'G':
  print("C")
elif b = 'C':
  print("G")

### FIXED CODE ###

b = input()
if b == 'A':
  print("T")
elif b == 'T':
  print("A")
elif b == 'G':
  print("C")
elif b == 'C':
  print("G")
n,k = [int(x) for x in input().split()]
h = [int(x) for x in input().split()]
dp = [float('inf')]*n
dp[-1] = 0
dp[-2] = abs(h[-1]-h[-2])

for i in range(n-3,-1,-1):
  for j in range(i+1,min(i+k,n)):
    dp[i] = min(dp[i],dp[j]+abs(h[i]-h[j])
                
print(dp[0])

### FIXED CODE ###

n,k = [int(x) for x in input().split()]
h = [int(x) for x in input().split()]
dp = [float('inf')]*n
dp[-1] = 0
dp[-2] = abs(h[-1]-h[-2])

for i in range(n-3,-1,-1):
  for j in range(i+1,min(i+k+1,n)):
    dp[i] = min(dp[i],dp[j]+abs(h[i]-h[j]))
                
print(dp[0])
a,b,c = map(int,(input().split()))
mb = input()

rl = list()
ll = list()

for i in range(a):
    if mb[i] == "x":continue
    if len(rl) == 0:
        rl.append(i + 1)
    else:
        if rl[-1] + c + 1 <= i + 1:
            rl.append(i + 1)
            if len(rl) == b:break

for i in range(a,-1,-1):
    if mb[i] == "x":continue
    if len(ll) == 0:
        ll.append(i + 1)
    else:
        d1 = ll[-1] - c - 1
        d2 = i + 1
        if  d1 >= d2:
            ll.append(i + 1)
            if len(ll) == b:break

ans=list()
for i,k in zip(rl,reversed(ll)):
    if b == 1 or b==0:break
    if i == k:
        ans.append(i)

[print(i) for i in ans]

### FIXED CODE ###

a,b,c = map(int,(input().split()))
mb = input()
 
rl = list()
ll = list()
 
for i in range(a):
    if mb[i] == "x":continue
    if len(rl) == 0:
        rl.append(i + 1)
    else:
        if rl[-1] + c + 1 <= i + 1:
            rl.append(i + 1)
            if len(rl) == b:break
 
for i in range(a-1,-1,-1):
    if mb[i] == "x":continue
    if len(ll) == 0:
        ll.append(i + 1)
    else:
        d1 = ll[-1] - c - 1
        d2 = i + 1
        if  d1 >= d2:
            ll.append(i + 1)
            if len(ll) == b:break
 
ans=list()
for i,k in zip(rl,reversed(ll)):
    if b == 1 and len(rl) != 1 or b==0:break
    if i == k:
        ans.append(i)
 
[print(i) for i in ans]
n,m = map(int,input().split())
L = [[] for _ in range(n)]

for i in range(m):
    a,b = map(lambda x:int(x)-1,input().split())
    L[a].append(b)
    L[b].append(a)
    
def dfs(i):
    if visited[i]:
        return
    visited[i] = True
    for j in L[i]:
        if visited[j]:
            continue
        dfs(j)
        
visited = [False]*n
cnt = 0

for i in range(n):
    if visited[i]:
        continue
    dfs(i)
    cnt +=1
    
print(cnt-1)

### FIXED CODE ###

n,m = map(int,input().split())

class Unionfind:
     
    def __init__(self,n):
        self.uf = [-1]*n
 
    def find(self,x):
        if self.uf[x] < 0:
            return x
        else:
            self.uf[x] = self.find(self.uf[x])
            return self.uf[x]
 
    def same(self,x,y):
        return self.find(x) == self.find(y)
 
    def union(self,x,y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.uf[x] > self.uf[y]:
            x,y = y,x
        self.uf[x] += self.uf[y]
        self.uf[y] = x
        return True
 
    def size(self,x):
        x = self.find(x)
        return -self.uf[x]
#a = [i+1 for i in range(n)]
d = Unionfind(n)

for i in range(m):
    a,b = map(int,input().split())
    d.union(a-1,b-1)
    
L = []
for i in range(n):
    c = d.find(i)
    L.append(c)
#print(L)
print(len(set(L))-1)
a, b, c, d = map(int, input().split())
lst = [a, b, c].sort()
a = lst[0]
b = lst[1]
v = lst[2]
if d > abs(a-b) and d > abs(c - b):
    print("No")
else:
    print("Yes")

### FIXED CODE ###

a, b, c, d = map(int, input().split())
if d >= abs(c-a):
    ans = "Yes"
else:
    if d >= abs(b-a) and d >= abs(c-b):
        ans = "Yes"
    else:
        ans = "No"
print(ans)
N = int(input())
A = map(int, input().split())

print(" ".join(map(str, A)))
for i in range(1, len(A)):
    key = A[i]
    j = i - 1
    while j >= 0 and A[j] > key:
        A[j + 1] = A[j]
        j -= 1
    A[j + 1] = key
    print(" ".join(map(str, A)))



### FIXED CODE ###

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

print(" ".join(map(str, A)))
for i in range(1, len(A)):
    key = A[i]
    j = i - 1
    while j >= 0 and A[j] > key:
        A[j + 1] = A[j]
        j -= 1
    A[j + 1] = key
    print(" ".join(map(str, A)))
from collections import Counter
N=int(input())
A=Counter(map(int,input().split()))

if len(A)==1:
  if 0 in A:
    print("Yes")
  else:
    print("No")
elif len(A)==2:
  if A[0]==N/3:
    print("Yes")
  else:
    print("No")
elif len(A)==3:
  if list(A.values())==[N/3]*3 and A.keys()[0]^A.keys()[1]^A.keys()[2]==0:
    print("Yes")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

from collections import Counter
N=int(input())
A=Counter(map(int,input().split()))

if len(A)==1:
  if 0 in A:
    print("Yes")
  else:
    print("No")
elif len(A)==2:
  if A[0]==N/3:
    print("Yes")
  else:
    print("No")
elif len(A)==3:
  if list(A.values())==[N/3]*3 and list(A.keys())[0]^list(A.keys())[1]^list(A.keys())[2]==0:
    print("Yes")
  else:
    print("No")
else:
  print("No")
n=input()
print(n[3]+n[4]+n[5])


### FIXED CODE ###

n=input()
print('ABC'+n)
N = int(input())
h = list(map(int, input().split()))
dp = [-1 for i in range(N)]
def rec(n):
    if dp[n] == -1:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            dp[n] = min(rec(n-2)+abs(h[n]-h[n-2]), rec(n-1)+abs(h[n]-h[n-1]))
    return dp[n]
print(rec(N-1))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)
N = int(input())
h = list(map(int, input().split()))
dp = [-1 for i in range(N)]
def rec(n):
    if dp[n] == -1:
        if n == 0:
            dp[n] = 0
        elif n == 1:
            dp[n] = abs(h[1]-h[0])
        else:
            dp[n] = min(rec(n-2)+abs(h[n]-h[n-2]), rec(n-1)+abs(h[n]-h[n-1]))
    return dp[n]
rec(N-1)
print(dp[N-1])
n=int(input())
a=list(map(int,input().split()))
a.sort()
ans = [1] * len(set(a))
index=0
for i in range(n):
    ans[index] = a.count(a[i]-1)+a.count(a[i])+a.count(a[i]+1)
    index+=1
print(max(ans))

### FIXED CODE ###

from collections import Counter
n=int(input())
a=list(map(int,input().split()))
collection = Counter(a)
# print(collection)
ans = [0] * 100010
for i in collection:
    ans[i] = collection[i-1]+collection[i]+collection[i+1]
print(max(ans))
x = int(input())

if x = 1:
    print("0")
else:
    print("1")

### FIXED CODE ###

x = int(input())

if x == 1:
    print('0')
else:
    print('1')
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a = input()
    print(" ".join(s.split(",")))
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()


### FIXED CODE ###

#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a = input()
    print(" ".join(a.split(",")))
    return

#B
def B():
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()
a = int(input())
total=0
while i < a:
  if i %5 != 0 and i %3 != 0:
    total += a
print(total)

### FIXED CODE ###

a = int(input())
total = 0
for i in range(1, a+1):
  if i % 5 != 0 and i % 3 != 0:
    total += i

print(total)
n = int(input())
ans = 0
for i in range(1, n + 1):
	cnt = 1
    while True:
  		n //= 10
  		cnt += 1
  		if n < 10:
    		break
	if n % 2 != 0:
      ans += 1
print(ans)

### FIXED CODE ###

n = int(input())
ans = 0
for i in range(1, n + 1):
  cnt = 0
  while i > 0:
    i //= 10
    cnt += 1
  if cnt % 2 != 0:
    ans += 1
print(ans)
n = int(input())
k = 0
for i range(:n+1):
  k += i

### FIXED CODE ###

n = int(input())
k = 0
for i in range(n+1):
  k += i
print(k)
t,a,b=map(int,input());print((t*a,b)[t*a>b])

### FIXED CODE ###

t,a,b=map(int,input().split())
if a*t>b:
    print(b)
else:
    print(a*t)
N = int(input())
L = list(map(int, input().split()))
if L[:-1] > L[-1]:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N = int(input())
L = list(map(int, input().split()))
L.sort()
if sum(L[:-1]) > L[-1]:
  print("Yes")
else:
  print("No")
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

def digit_sum(num:int, base:int) -> int:
    if num < base:
        return num
    else:
        return digit_sum(int(num/base), base) + (num % base)

from collections import deque

k = ni()
que = deque([1])

kmod = [0]*k

while kmod[0] == 0:
    cur = que.popleft()
    if kmod[cur%k] == 0:
        kmod[cur%k] = digit_sum(cur,10)
    
    if kmod[(10*cur)%k] == 0:
        que.appendleft(10*cur)
    
    if kmod[(cur+1)%k] == 0:
        que.append(cur+1)
            
        
print(kmod[0])

### FIXED CODE ###

from collections import deque

def bfs(K:int) -> list:
    hasChecked = [False]*(K+1)
    cost_list = [0]*(K+1)
    cost_list[1] = 1
    
    que = deque([(cost_list[1], 1)])
    
    while que:
        cost, res = que.popleft()
        if hasChecked[res]:
            continue
        
        hasChecked[res] = True
        cost_list[res] = cost
        
        if not hasChecked[10*res%K]:
            que.appendleft((cost, 10*res%K))
            
        if not hasChecked[(res+1)%K]:
            que.append((cost+1, (res+1)%K))
            
            
    return cost_list


K = int(input())
cost_list = bfs(K)
print(cost_list[0])
S = input()
l = []
for i in range(len(S) - 2):
    num = abs(int(S[i:i+3]) - 753)
    l.append(num)
print(min(l))

### FIXED CODE ###

X = int(input())

if(X == 3):
    print("YES")
elif(X == 5):
    print("YES")
elif(X == 7):
    print("YES")
else:
    print("NO")
#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    while 1:
        line = raw_input()
        if line == '0 0':
            break
        a, b = line.split()
        for i in range(a):
            print '#' * b
        print



### FIXED CODE ###

#!/usr/bin/env python
#-*- coding: utf-8 -*-

import sys

if __name__ == '__main__':
    while 1:
        line = raw_input()
        if line == '0 0':
            break
        a, b = map(int, line.split())
        for i in range(a):
            print '#' * b
        print
from math import log2

def cntOnes(n, N):
    ret = [0] * N
    i = 0
    while (n >> i) > 0:
        t = 2 ** i
        quot = n // t
        rem = n % t
        if quot % 2 == 1:
            ret[i] = (quot // 2) * t + (rem + 1)
        else:
            ret[i] = (quot // 2) * t
        i += 1
    return ret


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

dig = int(log2(B)) + 1
cntA = cntOnes(A - 1, dig)
cntB = cntOnes(B, dig)

ans = 0
for i, (a, b) in enumerate(zip(cntA, cntB)):
    if (a - b) % 2 == 1:
        ans += (1 << i)

print(ans)


### FIXED CODE ###

from math import log2


def cntOnes(n, N):
    ret = [0] * N
    i = 0
    while (n >> i) > 0:
        t = 2 ** i
        quot = n // t
        rem = n % t
        if quot % 2 == 1:
            ret[i] = (quot // 2) * t + (rem + 1)
        else:
            ret[i] = (quot // 2) * t
        i += 1
    return ret


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

if B == 0:
    print(0)
    exit()
dig = int(log2(B)) + 1
cntA = cntOnes(A - 1, dig) if A != 0 else [0] * dig
cntB = cntOnes(B, dig)

ans = 0
for i, (a, b) in enumerate(zip(cntA, cntB)):
    if (a - b) % 2 == 1:
        ans += (1 << i)

print(ans)
n,y = map(int,input().split())
box = []
for a in range(2001):
  for b in range(2001):
    c = n - a - b
    if 10000*a + 5000*b + 1000*c == y and 0 <= c <= 2000:
      box.append([a,b,c])
print(str(box[0][0]) + " " + str(box[0][1]) + " " + str(box[0][2]))

### FIXED CODE ###

n,y = map(int,input().split())
kekkas = []
for a in range(2001):
  for b in range(2001):
    kekka = 9000*a + 4000*b - (y - 1000*n)
    if kekka == 0:
      c = n - a - b
      if c >= 0:
        kekkas.append((a,b,c))
if len(kekkas) > 0 :
  print(str(kekkas[0][0]) + " " + str(kekkas[0][1]) + " " + str(kekkas[0][2]))
else:
  print("-1 -1 -1")
N,L = map(int,input().split())
s = sortedf([input() for i in range(N)])
print("".join(s))

### FIXED CODE ###

n,l = map(int,input().split())

list = sorted([input() for i in range(n)])
print("".join(list))
N, M = map(int,input().split())
A = sorted(list(map(int, input().split())))
BC = [list(map(int, input().split())) for _ in range(M)]
li = []
cnt = 0
for b, c in sorted(BC, key=lambda x:x[1], reverse=True):
  cnt += b
  if cnt >= N:
    break
  for _ in range(b):
    li.append(c)
for i in range(min(N,cnt)):
  if A[i] < li[i]:
    A[i] = li[i]
print(sum(A))

### FIXED CODE ###

N, M = map(int,input().split())
A = sorted(list(map(int, input().split())))
BC = [list(map(int, input().split())) for _ in range(M)]
li = []
cnt = 0
for b, c in sorted(BC, key=lambda x:x[1], reverse=True):
  cnt += b
  for _ in range(b):
    li.append(c)
  if cnt >= N:
    break
for i in range(min(N,cnt)):
  if A[i] < li[i]:
    A[i] = li[i]
print(sum(A))
while True:
    n,m = list(map(int,input().split()))
    print(amari)

### FIXED CODE ###

while True:
    try:
        n,m = list(map(int,input().split()))
        if n == 0 and m == 0:
            break
        amari = n % m
        yasai = list(map(int,input().split())) 
        yasai.sort()

        s = 0
        for i in range(n):
            if (i+1) % m > 0:
                s += yasai[-i-1]
        print(s)
    except:
        pass
n = input()

if n.index('7'):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = input()

if '7' in n:
  print('Yes')
else:
  print('No')
import sys
import numpy as np

N, M = list(map(int, sys.stdin.readline().strip().split(" ")))
A = list(map(int, sys.stdin.readline().strip().split(" ")))
B = []
C = []

for _ in range(M):
    b, c = list(map(int, sys.stdin.readline().strip().split(" ")))
    B.append(b)
    C.append(c)

A = sorted(A)
arg_list = list(reversed(np.argsort(C)))
B = np.array(B)[arg_list]
C = np.array(C)[arg_list]

index = 0
count = 0
flag = False
for b, c in zip(B, C):
    for _ in range(b):
        if A[index] >= c:
            flag = True
            break
        if index == N:
            flag = True
            break
        A[index] = c
        index += 1
    if flag:
        break

print(sum(A))
        



### FIXED CODE ###

import sys
import numpy as np

N, M = list(map(int, sys.stdin.readline().strip().split(" ")))
A = list(map(int, sys.stdin.readline().strip().split(" ")))
B = []
C = []

for _ in range(M):
    b, c = list(map(int, sys.stdin.readline().strip().split(" ")))
    B.append(b)
    C.append(c)

A = sorted(A)
arg_list = list(reversed(np.argsort(C)))
B = np.array(B)[arg_list]
C = np.array(C)[arg_list]

index = 0
count = 0
flag = False
for b, c in zip(B, C):
    for _ in range(b):
        if index == N:
            flag = True
            break
        if A[index] >= c:
            flag = True
            break
        A[index] = c
        index += 1
    if flag:
        break

print(sum(A))
from collections import Counter
s = sorted(Counter(input()).values)
t = sorted(Counter(input()).values)
print("Yes" if s==t else "No")

### FIXED CODE ###

from collections import Counter
s=sorted(Counter(input()).values())
t=sorted(Counter(input()).values())
print("Yes" if s==t else "No")
#Biscuits

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

#奇数の数
k = sum([A[i]%2 for i in range(N)])

if ( k ==0 ):
    ans = int(p==0)
else:
    ans = 2**(N-1)
print(ans)

### FIXED CODE ###

#Biscuits

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

#奇数の数
k = 0
for a in A:
    k += a%2
if ( k ==0 ):
    ans = (3-P)%2 * 2**N
else:
    ans = 2**(N-1)
print(ans)
print(eval("'ACL'*input()"))

### FIXED CODE ###

print(eval("'ACL'*"+input()))
n=int(input())
a=[int(i) for i in input().split()]
iro=[0 for i in range(8)]
tyi=0
for i in range(n):
  if a<3200:
    iro[int(a/400)]=1
  else:
    tyi+=1
print(min(iro.count(1)+tyi,8))

### FIXED CODE ###

n=int(input())
a=[int(i) for i in input().split()]
iro=[0 for i in range(8)]
tyi=0
for i in range(n):
  if a[i]<3200:
    iro[int(a[i]/400)]=1
  else:
    tyi+=1
print(max(iro.count(1),1),iro.count(1)+tyi)
n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().sl.plit(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else x[0] == x[1]:
		taro += 1
		hana += 1
print taro,hana

### FIXED CODE ###

n = input()
taro = 0
hana = 0
for val in range(1,n+1):
	x = map(str,raw_input().split(' '))
	if x[0] > x[1]:
		taro += 3
	elif x[0] < x[1]:
		hana += 3
	else:
		taro += 1
		hana += 1
print taro,hana
def main():
    N = int(input())
    up_lines = []
    down_lines = []
    for i in range(N):
        s = input()
        height = 0
        bottom = 0
        for c in s:
            if c == "(":
                height += 1
            else:
                height -= 1
                bottom = min(bottom, height)
        if height > 0:
            up_lines.append((bottom, height))
        else:
            down_lines.append((bottom-height, -height))
    up_lines.sort(reverse=True, key=lambda line: line.bottom)
    down_lines.sort(reverse=True, key=lambda line: line.bottom)
    left = 0
    for bottom, height in up_lines:
        if left + bottom < 0:
            print("No")
            return
        left += height
    right = 0
    for bottom, height in down_lines:
        if right + bottom < 0:
            print("No")
            return
        right += height
    if left == right:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import namedtuple
Line = namedtuple('Line', ['lowest', 'end'])


def main():
    N = int(input())
    up_lines = []
    down_lines = []
    for i in range(N):
        s = input()
        now = 0
        lowest = 0
        for c in s:
            if c == "(":
                now += 1
            else:
                now -= 1
                lowest = min(lowest, now)
        if now > 0:
            up_lines.append(Line(lowest, now))
        else:
            down_lines.append(Line(lowest-now, -now))
    up_lines.sort(key=lambda line: -line.lowest)
    down_lines.sort(key=lambda line: -line.lowest)
    left = 0
    for line in up_lines:
        if left + line.lowest < 0:
            print("No")
            return
        left += line.end
        if left < 0:
            print("No")
            break
    right = 0
    for line in down_lines:
        if right + line.lowest < 0:
            print("No")
            return
        right += line.end
        if right < 0:
            print("No")
            break
    if left == right:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()
pow(input(), 3)

### FIXED CODE ###

x = int(input())

print(pow(x, 3))
n=int(input())
slime=list(map(int,input().split()))
stack=0
ans=0
for i in slime:
  if i!=stack:
    stack=i
    ans+=(count+1//2)
    count=0
    continue
  count+=1
ans+=(count+1//2)
print(ans)

### FIXED CODE ###

n=int(input())
slime=list(map(int,input().split()))
stack=0
count=0
ans=0
for i in slime:
  if i!=stack:
    stack=i
    ans+=((count+1)//2)
    count=0
    continue
  count+=1
  stack=i
ans+=((count+1)//2)
print(ans)