Harryxun/stf_run huggingface dataset:
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

N, W = l_inpl()
w, v = [], []

for _ in range(N):
    wi, vi = l_inpl()
    w.append(wi)
    v.append(vi)

# dp[i][sum_w]: i-1番目までの品物から重さがWを超えないように選んだときの価値の総和の最大値
dp = [[0] * (W+1) for _ in range(N+1)]
# print(dp)
dp[0][W] = 0

for i in range(N):
    for sum_w in range(W+1):
        # i番目の品物を選ぶ場合
        if sum_w >= w[i]:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        
        # i番目の品物を選ばない場合
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])
    

print(dp[N][W])



### FIXED CODE ###

import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
# 一次元累積和
from itertools import accumulate
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.special import perm
# from scipy.special import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

########

N, W = l_inpl()
w, v = [], []
item = [[] for i in range(4)]

for i in range(N):
    wi, vi = l_inpl()
    if i == 0:
        item[0].append(vi)
        w_base = wi
    else:
        item[wi - w_base].append(vi)

w0, w1, w2, w3 = item
w0 = [0] + list(accumulate(sorted(w0, reverse=True)))
w1 = [0] + list(accumulate(sorted(w1, reverse=True)))
w2 = [0] + list(accumulate(sorted(w2, reverse=True)))
w3 = [0] + list(accumulate(sorted(w3, reverse=True)))

ans = 0
for i in range(len(w0)):
    for j in range(len(w1)):
        for k in range(len(w2)):
            tmp_weight = w_base * i + (w_base + 1) * j + (w_base + 2) * k
            if tmp_weight > W:
                continue
            l = min((W - tmp_weight) // (w_base + 3), len(w3) - 1)
            tmp_ans = w0[i] + w1[j] + w2[k] + w3[l]
            ans = max(ans, tmp_ans)

print(ans)
import sys
input = sys.stdin.readline

N = int(input())
A = [int(input()) for _ in range(N)]

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

pre = [[] for _ in range(n)]
p = []

for i in range(m):
    p.append(list(map(int, input().split())))
    pre[p[i][0] - 1].append(p[i][1])

for i in range(m):
    pref = "{:0>6}".format(p[i][0])

    years = pre[p[i][0] - 1]
    years.sort()

    y = years.index(p[i][1]) + 1
    year = "{:0>6}".format(y)
    print(pref + year)


### FIXED CODE ###

import sys
input = sys.stdin.readline

n, m = map(int, input().split())
p = [list(map(int, input().split()+[i])) for i in range(m)]

p.sort()
cnt = 0
pre = -1

for city in p:
    if city[0] == pre:
        cnt = cnt + 1
    else:
        pre = city[0]
        cnt = 1

    city.append("{:0>6}{:0>6}".format(city[0], cnt))

p.sort(key = lambda x: x[2])

for city in p:
    print(city[3])
n, k = map(int, input().split())
a = list(map(int, input().split()))

l = []
sum = 0
  
for i in range(0, k+1):
  for j in a:
    sum += i ^ j
  l.append(sum)
  sum = 0


print(max(l))

### FIXED CODE ###

t, x = map(int, input().split())

print(t/x)
import numpy as np

A, B, Q = [int(i) for i in input().split()]

s = np.array([[int(input()) for i in range(A)]])
t = np.array([[int(input()) for i in range(B)]])
x = np.array([[int(input()) for i in range(Q)]])

xtot = np.abs(x-t.T).argmin(axis=0)
xtos = np.abs(s-x.T).argmin(axis=1)

t = np.array([t[0, xtot]])
s = np.array([s[0, xtos]])

stot = np.abs(s-t.T).argmin(axis=0)
ttos = np.abs(s-t.T).argmin(axis=1)

pata = abs(x - t) + abs(t - s[0, ttos]) 
patb = abs(x - s) + abs(s - t[0, stot]) 

for i in range(Q):
    if pata[0, i] >= patb[0, i]:
        print(patb[0, i])
    else:
        print(pata[0, i])

# for i, (a, b) in enumerate(zip(xtot, xtos)):
#     pata = abs(x[0, i] - t[0, i]) + abs(t[0, i] - s[0, ttos[i]]) 
#     patb = abs(x[0, i] - s[0, i]) + abs(s[0, i] - t[0, stot[i]]) 
#     if pata <= patb:
#         print(pata)
#     else:
#         print(patb)


### FIXED CODE ###

import bisect

A, B, Q = [int(i) for i in input().split()]

s = [-10**12] + [int(input()) for i in range(A)] + [10**12]
t = [-10**12] + [int(input()) for i in range(B)] + [10**12]
x = [int(input()) for i in range(Q)]

for item in x:
    a, c = bisect.bisect_left(s, item), bisect.bisect_left(t, item)
    min_value = 10**12
    for item_a in [s[a-1], s[a]]:
        for item_c in [t[c-1], t[c]]:
            pata = abs(item_a - item) + abs(item_a - item_c)
            patb = abs(item_c - item) + abs(item_a - item_c)
            min_value = min(min_value, pata, patb)
    print(min_value)
N = int(input())

ALL = N*800
TIMES = N //15


if N < 15:
    print(ALL)
else:
    print(All - (200*TIMES))

### FIXED CODE ###

N = int(input())
sum = 800 * N
otsuri = (N // 15) * 200

print(sum - otsuri)
import sys
input=sys.stdin.readline

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

ans = b//c - a//c
print(ans)

### FIXED CODE ###

a,b,c = input().split()
print("A" +b[0]+ "C")
n=input()
l=list(map(int,input().split()))
count=0
for i in range(n):
  num=l[i]
  while num%2==0:
    count+=1
    num=num//2
print(count)

### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
c=0
for i in l:
  while i%2==0:    
    c+=1
    i=i//2
print(c)
def floor_linear_sum(n,m,a,b):
    """
    returns sum((a*i+b)//m for i in range(n))
    """
    res = 0
    while True:
        if a >= m:
            res += (n-1)*n*(a//m)//2
            a %= m
        if b >= m:
            res += n * (b//m)
            b %= m

        y_max = (a*n+b)//m
        if y_max == 0:
            return res
        nx_max = b - y_max*m
        res += (n + nx_max//a)*y_max
        n,m,a,b = y_max, a, m, nx_max%a

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

T = readline()
m = map(int,read().split())
for t in zip(m,m,m,m):
    print(solve(*t))

### FIXED CODE ###

def floor_linear_sum(n,m,a,b):
    res = 0
    while True:
        if a >= m:
            res += (n-1)*n*(a//m)//2
            a %= m
        if b >= m:
            res += n * (b//m)
            b %= m

        y_max = (a*n+b)//m
        if y_max == 0:
            return res
        x_max = y_max*m-b
        res += (n - (x_max + a - 1)//a)*y_max
        n,m,a,b = y_max, a, m, (a-x_max)%a

T = int(input())
for _ in range(T):
    print(floor_linear_sum(*map(int,input().split())))
# g = [1000, 800, 100]
#takes = [300, 333, 400, 444, 500, 555, 600, 666]
#g = [100, 90, 80]
#takes = [100, 100, 90,90,90,80,80,80]
#  g = [100,90,80]
#  takes = [98, 40, 30, 21, 80, 0,0,0]
N,A,B,C = [int(input()) for i in range(0,4)]
g=[A, B, C]
takes =[]
for i in range(N):
    takes.append(int(input())
combis = []
for i in range(4):
    for j in range(4):
        for k in range(4):
            for l in range(4):
                for m in range(4):
                    for n in range(4):
                        for o in range(4):
                            for p in range(4):
                                #  print(i,j,k,l,m,n,o,p)
                                combis.append([i,j,k,l,m,n,o,p])
#  print(combis)
min_diff = 10**10
for combi in combis:
    A,B,C = 0,0,0
    for idx, el in enumerate(combi):
        if el == 0:
            A += takes[idx]
        elif el == 1:
            B += takes[idx]
        elif el == 2:
            C += takes[idx]

        if A == 0 or B == 0 or C == 0:
            continue

        A_diff = abs(g[0] - A) + (len([_ for _ in combi if _ == 0]) - 1)*10
        B_diff = abs(g[1] - B) + (len([_ for _ in combi if _ == 1]) - 1)*10
        C_diff = abs(g[2] - C) + (len([_ for _ in combi if _ == 2]) - 1)*10
        diff = A_diff + B_diff + C_diff
        min_diff = min(diff, min_diff)

print(minq_diff)


### FIXED CODE ###

N, A, B, C = map(int, input().split())
takes = []
for i in range(N):
    takes.append(int(input()))
#  g = [100,90,80]
#  takes = [98, 40, 30, 21, 80, 0,0,0]
takes = takes+[0,0,0,0,0,0,0]
takes = takes[:8]
g = [A, B, C]
combis = []
for i in range(4):
    for j in range(4):
        for k in range(4):
            for l in range(4):
                for m in range(4):
                    for n in range(4):
                        for o in range(4):
                            for p in range(4):
                                #  print(i,j,k,l,m,n,o,p)
                                combis.append([i,j,k,l,m,n,o,p])
#  print(combis)
min_diff = 10**10
for combi in combis:
    A,B,C = 0,0,0
    for idx, el in enumerate(combi):
        if el == 0:
            A += takes[idx]
        elif el == 1:
            B += takes[idx]
        elif el == 2:
            C += takes[idx]

        if A == 0 or B == 0 or C == 0:
            continue

        A_diff = abs(g[0] - A) + (len([_ for _ in combi if _ == 0]) - 1)*10
        B_diff = abs(g[1] - B) + (len([_ for _ in combi if _ == 1]) - 1)*10
        C_diff = abs(g[2] - C) + (len([_ for _ in combi if _ == 2]) - 1)*10
        diff = A_diff + B_diff + C_diff
        min_diff = min(diff, min_diff)

print(min_diff)
A = int(input())
B = int(input())
C = int(input())
X = int(input())
Y = [A, B, C]
# A = list(map(int,input().split()))
A1 = list(map(lambda x: x+1,Y))
count = 0
sum = 0

for i in range(a):
    for j in range(b):
        for k in range(c):
            sum = 500*i + 100*j + 50*k 
            if X == sum:
                count+=1
print(count)

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
X = int(input())
count = 0
sum = 0

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            sum = 500*i + 100*j + 50*k 
            if X == sum:
                count+=1
print(count)
import math

def read():
    A, B = map(int, input().strip().split())
    return A, B

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def solve(A, B):
    gcd = math.gcd(A, B)
    divisors = sorted(make_divisors(gcd))
    table = [True] * len(divisors)
    for i in range(1, len(divisors)):
        for j in range(i+1, len(divisors)):
            if table[j] and divisors[j] % divisors[i] == 0:
                table[j] = False
    divisors = [divisors[i] for i in range(len(divisors)) if table[i]]
    return len(divisors)

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))


### FIXED CODE ###

import fractions

def read():
    A, B = map(int, input().strip().split())
    return A, B

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

def solve(A, B):
    gcd = fractions.gcd(A, B)
    divisors = sorted(make_divisors(gcd))
    table = [True] * len(divisors)
    for i in range(1, len(divisors)):
        for j in range(i+1, len(divisors)):
            if table[j] and divisors[j] % divisors[i] == 0:
                table[j] = False
    divisors = [divisors[i] for i in range(len(divisors)) if table[i]]
    return len(divisors)

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
if v - w == 0:
  print('NO')
  exit()
if 0 <= (a-b) / (v-w) <= t:
  print('YES')
else:
  print('NO')



### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, v = rm()
b, w = rm()
t = ri()
if v - w == 0:
  print('NO')
  exit()
if 0 <= abs(a-b) / (v-w) <= t:
  print('YES')
else:
  print('NO')
import fractions
from functools import reduce

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

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

b = lcm_list(a)

m -= (b/2)

ans = (m//b) + 1
print(int(ans))

### FIXED CODE ###

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

from fractions import gcd
from functools import reduce

a = [i >> 1 for i in a]

def applied_lcm(x, y):
    g = gcd(x, y)
    x //= g
    y //= g
    if x %2 == 0:
        return 0
    if y %2 == 0:
        return 0
    n = x * y * g
    if n >> 10**9:
        return 0

    return n

p = reduce(applied_lcm, a)
if p == 0:
    ans = 0
else:
    ans = (m//p) - (m//(p+p))
print(ans)
N,K=map(int,input().split())
H=[]
for i in range(N):
  H.append(int(input()))
H.sort()
ans=H[K-1]-H[0]
for i in range(N-K+1):
  if H[K+i]-H[i]>0:
    ans=ans+H[K+i]-H[i]
print(ans)

### FIXED CODE ###

N,K=map(int,input().split())
H=[]
for i in range(N):
  H.append(int(input()))
H.sort()
print(min(H[i+K-1]-H[i] for i in range(N-K+1)))
X=int(input())
import numpy as np
t=int(X**(1/5))+10
i=-1
while  i < t:
    s=((i**5)+X)**(1/5)
    u=(X-(i**5))**(1/5)
    if s==int(s):
        print(i,int(s))
        break
    if u==int(u):
        print(i,int(-u))
        break
    i+=1








### FIXED CODE ###

x = int(input())
a=0
b=0
for i in range(-400,400):
    for j in range(-400,400):
        if i**5 - j**5 == x:
            a = i
            b = j
            exit

print(a,b)
# coding: utf-8
# Your code here!


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

el = []
for _ in range(m):
    a,b,c = map(int,input().split())
    el.append((a-1,b-1,c-p))
cost = [-float("inf") for _ in range(n)]
cost[0] = 0
for i in range(n+1):
    for j in range(m):
        e = el[j]
        if cost[e[1]] < cost[e[0]] + e[2]:
            cost[e[1]] = cost[e[0]] + e[2]
            if i == n:
                cost[e[1]] = float("inf")
              
if ans != cost[-1]:
    print(-1)
else:
    print(max(cost[-1], 0))
        

### FIXED CODE ###

# coding: utf-8
# Your code here!


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

el = []
for _ in range(m):
    a,b,c = map(int,input().split())
    el.append((a-1,b-1,c-p))
cost = [-float("inf") for _ in range(n)]
cost[0] = 0
for i in range(2*n):
    for j in range(m):
        e = el[j]
        if cost[e[1]] < cost[e[0]] + e[2]:
            cost[e[1]] = cost[e[0]] + e[2]
            if i >= n:
                cost[e[1]] = float("inf")
    if i == n-1:
        ans = cost[-1]
        
              
if ans != cost[-1]:
    print(-1)
else:
    print(max(ans, 0))
import itertools

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

    for i in range(m):
        a, b = map(int, input().split())
        S[a - 1][b - 1] = 1
        S[b - 1][a - 1] = 1

    ans = 0
    for p in itertools.permutations(range(n)):
        if p[0] != 0:
            break
        tmp = 1
        for i, v in enumerate(n-1):
            tmp *= S[p[i]][p[i + 1]]
        ans += tmp

    print(ans)

if __name__ == '__main__':
    resolve()

### FIXED CODE ###

# サンプルコード計算量お試し

import itertools

N, M = map(int, input().split())
adj_matrix = [[0]* N for _ in range(N)]

for i in range(M):
    a, b = map(int, input().split())
    adj_matrix[a-1][b-1] = 1
    adj_matrix[b-1][a-1] = 1

cnt = 0

for each in itertools.permutations(range(N)):
    if each[0] != 0:
        break
    factor = 1
    for i in range(N-1):
        factor *= adj_matrix[each[i]][each[i+1]]
    cnt += factor

print(cnt)
n = int(input())

get = []
for i in range(10):
  npow6 = 6**(i+1)
  npow9 = 9**(i+1)
  if npow6 <= 100000:
    get.append(npow6)
  if npow9 <= 100000:
    get.append(npow9)
  
get = sorted(get)

memo = [-1] * 110000
for i in range(6):
  memo[i] = i
  
def dfs(money):
  if memo[money] != -1:
    return memo[money]
  if money == 0:
    return 0
  
  ret = 110000
  for g in get:
    if g > money:
      continue
    ret0 = dfs(money-g) + 1
    ret = min(ret, ret0)
  memo[money] = ret
  return ret

print(dfs(n))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000)

n = int(input())

get = []
for i in range(10):
  npow6 = 6**(i+1)
  npow9 = 9**(i+1)
  if npow6 <= 100000:
    get.append(npow6)
  if npow9 <= 100000:
    get.append(npow9)
  
get = sorted(get)

memo = [-1] * 110000
for i in range(6):
  memo[i] = i
  
def dfs(money):
  if memo[money] != -1:
    return memo[money]
  ret = 110000
  for g in get:
    if g > money:
      continue
    ret0 = dfs(money-g) + 1
    ret = min(ret, ret0)
  memo[money] = ret
  return ret

print(dfs(n))
N = int(input())
*A, = map(int,input().split())

if N%3:
    ans = True
    for a in A:
        if a:ans=False;break
else:
    B = set(A)
    l = len(B)
    ans = True
    if l>3:
        ans = False
    elif l==2:
        ans = False
        1/0
    elif l==1:
        for b in B:
            if b:ans=False;break
    else:
        a,b,c = B
        ans = ans and (A.count(a)==A.count(b)==A.count(c)==N//3) and (a^b==c)
        
if ans:print("Yes")
else:print("No")

### FIXED CODE ###

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

if N%3:
    ans = True
    for a in A:
        if a:ans=False;break
else:
    B = set(A)
    l = len(B)
    ans = True
    if l>3:
        ans = False
    elif l==1:
        for b in B:
            if b:ans=False;break
    else:
        if l==3:
            a,b,c = B
            l,m,n = (A.count(x) for x in (a,b,c))
        if l==2:
            a,b = B
            l,m = (A.count(x) for x in (a,b))
            if l>=m:
                c=a
                n=l//2
                l-=n
            else:
                c=b
                n=m//2
                m-=n
        ans = ans and (l==m==n==N//3) and (a^b==c)
        
if ans:print("Yes")
else:print("No")
while True:
    N,M,P=map(int,input().split())
    if N==M==P: break
    divSum=0
    for i in range(N):
        temp=int(input())
        divSum+=temp*100
        if i==M-1:
            numWin=temp
    divSum*=(100-P)/100
    if temp!=0:
        dividents=int(divSum/numWin)
    else: dividents=0
    print(dividents)


### FIXED CODE ###

import math
while True:
    N,M,P=map(int,input().split())
    if N==M==P: break
    divSum=0
    for i in range(N):
        temp=int(input())
        divSum+=temp*100
        if i==M-1:
            numWin=temp
    divSum=int(divSum*(100-P)/100)
    if numWin!=0:
        dividents=math.floor(divSum/numWin)
    else: dividents=0
    print(dividents)
import math
N = int(input())
ans = 0
for i in range(1, int(N**0.5)+1):
    if i == N % (N//i - 1):
        ans += N//i - 1

print(ans)


### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, int(N**0.5)+1):
    if N // i > 1:
        if i == N % (N//i - 1):
            ans += N//i - 1

print(ans)
number = int(input())
if number * 2 = 0:
	odd_num = number // 2
	percent = odd_num / number
else:
	odd_number = number // 2 + 1
    percent = odd_num / number
  
print(percent)


### FIXED CODE ###

number = int(input())
if number % 2 == 0:
	odd_num = number // 2
	percent = odd_num / number
else:
	odd_num = number // 2 + 1
	percent = odd_num / number

print(percent)
n=int(input())
a=list(map(int, input().split()))
if a[0]>0:
    ans=-1
x=0
ans=1
nezen=1
suu=0
su=0
for x in a:
    su+=x
    suu+=x
for x in range(1,n):
    if nezen<0:
        ans=-1
        break
    ha=a[x]
    su-=ha
    ne=(min(su,nezen*2-ha))
    ans+=ne
    nezen=ne
if ans!=-1:
    ans+=suu
    nezen=ne
    if ne<=0:
        ans=-1
print(ans)

### FIXED CODE ###

def aaaa():
    n=int(input())
    a=list(map(int, input().split()))
    ans=0
    if a[0]>0:
        if a[0]==1 and n==0:
            return 1
        else:
            return -1
        return -1
    nezen=1
    hazen=0
    line=[]
    liha=[]
    line.append(nezen)
    liha.append(hazen)
    su=0
    su=sum(a[x] for x in range(len(a)))
    for x in range(1,n+1):
        if nezen<=0:
            return -1
        ha=a[x]
        su-=ha
        ne=min(nezen*2-ha,su)
        nezen=ne
        line.append(ne)
        liha.append(ha)
    if line[n]<0:
        return -1
    line[n]=0
    for x in range(len(line)):
        ans+=line[x]+liha[x]
    return ans
print(aaaa())
L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ({}:{}:{}.format(L[0],L[2],L[3]))

### FIXED CODE ###

L=[]
s=int(raw_input())
L+=divmod(s,3600)
L+=divmod(L[1],60)
print ("{0}:{1}:{2}").format(L[0],L[2],L[3])
a = input()
if ((a == "a") or (a == "i") or (a == "u") or (a == "o") or (a == "e"))
    print("vowel")
else:
    print("consonant")

### FIXED CODE ###

a = input()
if ((a == "a") or (a == "i") or (a == "u") or (a == "o") or (a == "e")):
    print("vowel")
else:
    print("consonant")
x,y = map(int,input.split())
if x*y % 2 == 0 :
    print("Even")
    else print("Odd")
end



### FIXED CODE ###

a,b = map(int,input().split())
if a*b%2==0:
    print('Even')
elif a*b%2==1:
    print('Odd')
x,y,z,k = map(int,input().split())
A,B,C= [[int(i) for i in input().split()] for j in range(3)]
AB = []
ABC = []
for i in range(x):
        for j in range(y):
                AB.append(A[i]+B[j])
AB.sort(reverse = True)
for i in range(min(k,len(AB))):
        for j in range(z):
                ABC.append(AB[i]+C[j])
ABC.sort(reverse = True)
for i in range(k):
        print(ABC[i])

### FIXED CODE ###

x = []
for i in range(5):
        x.append(int(input()))
k = int(input())
a = x[0]
n = True
for i in x:
        b = abs(a-i)
        if b > k:
                n = False
        else:
                None
if not n:
        print(":(")
else:
        print("Yay!")
n = input()
l = list(map(int,input().split(" ")))
 
count = 0
 
while True:
  for i in range(n):
    if l[i]%2 == 0:
      l[i] = l[i]//2
    else:
      print(count)
      break
  count += 1
 

### FIXED CODE ###

print(input().count("1"))
N, M = list(map(int, input().split()))
ab = {i:[] for i in range(N)}
for _ in range(M):
    a, b = list(map(int, input().split()))
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
cand = [[0]+[one] for one in ab[0]]
while len(cand)>0:
    tmp_cand = []
    for c in cand:
        last = c[-1]
        n = []
        for nc in ab[last]:
            if nc not in c:
                n.append(c+[nc])
        tmp_cand.extend(n)
    cand = tmp_cand
    if len(cand[0])==N:
        break
print(len(cand))

### FIXED CODE ###

N, M = list(map(int, input().split()))
ab = {i:[] for i in range(N)}
for _ in range(M):
    a, b = list(map(int, input().split()))
    ab[a-1].append(b-1)
    ab[b-1].append(a-1)
    
cand = [[0]+[one] for one in ab[0]]
while len(cand)>0 and len(cand[0])<N:
    tmp_cand = []
    for c in cand:
        last = c[-1]
        n = []
        for nc in ab[last]:
            if nc not in c:
                n.append(c+[nc])
        tmp_cand.extend(n)
    cand = tmp_cand
print(len(cand))