Harryxun/stf_run huggingface dataset:
import math
n=int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3=[float(i) for i in input().split()]
    t1=x1*(x2+x3-x1)+y1*(y2+y3-y1)
    t2=x2*(x1+x3-x2)+y2*(y1+y3-y2)
    t3=x3*(x1+x2-x3)+y3*(y1+y2-y3)
    px=(t1*x1+t2*x2+t3*x3)/(t1+t2+t3)
    py=(t1*y1+t2*y2+t3*y3)/(t1+t2+t3)
    r=math.hypot(px-x1,py-y1)
    print("%f %f %f"%(round(px,3),round(py,3),round(r,3)))


### FIXED CODE ###

import math
n=int(input())
for i in range(n):
    x1,y1,x2,y2,x3,y3=[float(i) for i in input().split()]
    A=math.hypot(x2-x3,y2-y3)**2
    B=math.hypot(x1-x3,y1-y3)**2
    C=math.hypot(x1-x2,y1-y2)**2
    t1=A*(B+C-A)
    t2=B*(A+C-B)
    t3=C*(A+B-C)
    px=(t1*x1+t2*x2+t3*x3)/(t1+t2+t3)
    py=(t1*y1+t2*y2+t3*y3)/(t1+t2+t3)
    r=math.hypot(px-x1,py-y1)
    print("%.3f %.3f %.3f"%(round(px,3),round(py,3),round(r,3)))
N, M = map(int, input().split())

ks = []
for i in range(M):
    ks.append(list(map(int, input().split())))

p = list(map(int, input().split()))

cnt = 0
for i in range(2**N): # スイッチの組み合わせ
    light = 0
    switch = format(i, f'0{N}b')
    for j in range(M): # j番目の電球はどうなってる？
        pj = p[j]
        kj = ks[j][0]
        on = 0
        for l in range(1, kj+1): # 指定されたスイッチ番号はon?
            if switch[ks[j][l]-1] == '1':
                on += 1
        if on % 2 == pj:
            light += 1
        else:
            break
    if light == M:
        cnt += 1

print(cnt)

### FIXED CODE ###

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

ks = []
for i in range(M):
    ks.append(list(map(int, input().split())))

p = list(map(int, input().split()))

cnt = 0
for i in range(2**N):
    light = 0
    switch = format(i, '0'+str(N)+'b')
    for j in range(M):
        pj = p[j]
        kj = ks[j][0]
        on = 0
        for l in range(1, kj+1):
            if switch[ks[j][l]-1] == '1':
                on += 1
        if on % 2 == pj:
            light += 1
        else:
            break
    if light == M:
        cnt += 1

print(cnt)
n=int(input())
p=[list(map(int,input().split())) for i in range(n)]
ans=0
den=1
for i in range(n):
  ans+=(p[i][0]**2+p[i][1]**2)**0.5
  den*=i
print(ans/den)

### FIXED CODE ###

def dis(p1,p2):
  return ((p1[0]-p2[0])**2+(p1[1]-p2[1])**2)**0.5

n=int(input())
p=[list(map(int,input().split())) for i in range(n)]
ans=0
for i in range(n):
  for j in range(i+1,n):
    ans+=dis(p[i],p[j])
print(ans*2/n)
#わからんテスト
import copy

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

t = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
L = {}
for i in A:
  if t[i] in L:
    if L[t[i]] < i:
      L[t[i]] = i
  else:
    L[t[i]] = i

dp = [[0 for j in range(10)] for i in range(N)]
for i in L.items():
  dp[i[0] - 1][i[1]] = 1
for i in range(N):
  if max(dp[i]) == 0:
    continue
  for j in L.items():
    k = i + j[0]
    if k < N:
      t = copy.deepcopy(dp[i])
      t[j[1]] += 1
      if sum(t) > sum(dp[k]):
        dp[k] = t
      else:
        for ii in range(9, 0, -1):
          if t[ii] > dp[k][ii]:
            dp[k] = t
            break
          elif t[ii] < dp[k][ii]:
            break

### FIXED CODE ###

import copy

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

t = [0, 2, 5, 5, 4, 5, 6, 3, 7, 6]
L = {}
for i in A:
  if t[i] in L:
    if L[t[i]] < i:
      L[t[i]] = i
  else:
    L[t[i]] = i

dp = [[0 for j in range(10)] for i in range(N)]
for i in L.items():
  if i[0] - 1 < N:
    dp[i[0] - 1][i[1]] = 1
for i in range(N):
  if max(dp[i]) == 0:
    continue
  for j in L.items():
    k = i + j[0]
    if k < N:
      t = copy.deepcopy(dp[i])
      t[j[1]] += 1
      if sum(t) > sum(dp[k]):
        dp[k] = t
      else:
        for ii in range(9, 0, -1):
          if t[ii] > dp[k][ii]:
            dp[k] = t
            break
          elif t[ii] < dp[k][ii]:
            break
          
t = dp[-1]
Ans = ""
for i in range(9, 0, -1):
  for j in range(t[i]):
    Ans += str(i)
    
print(Ans)
n, c = map(int,input().split())

xvl = []
for _ in range(n):
    x,v = map(int,input().split())
    xvl.append((x,v))

get_l = []
sum_v = 0
for x, v in xvl:
    sum_v += v
    get_l.append(sum_v - x)

import itertools
get_l_ac = list(itertools.accumulate(get_l, max))
get_r = []
sum_v = 0
for x, v in xvl[::-1]:
    sum_v += v
    get_r.append(sum_v - (c - x))


ans = 0
x = 0
for i in range(n):
    tmp = 0
    if i > 0:
        x = c - xvl[-i][0]
        tmp += get_r[i-1]
    ans = max(tmp, tmp - x + get_l_ac[n - i - 1], ans)

get_r_ac = list(itertools.accumulate(get_r, max))
x = 0
for i in range(n):
    tmp = 0
    if i > 0:
        x = xvl[i-1][0]
        tmp += get_l[i-1]
    ans = max(tmp, tmp - x + get_r_ac[n - i - 1], ans)

print(ans)

### FIXED CODE ###

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

xvl = []
for _ in range(n):
    x,v = map(int,input().split())
    xvl.append((x,v))

get_l = []
sum_v = 0
for x, v in xvl:
    sum_v += v
    get_l.append(sum_v - x)

import itertools
get_l_ac = list(itertools.accumulate(get_l, max))
get_r = []
sum_v = 0
for x, v in xvl[::-1]:
    sum_v += v
    get_r.append(sum_v - (c - x))


ans = 0
x = 0
for i in range(n):
    tmp = 0
    if i > 0:
        x = c - xvl[-i][0]
        tmp += get_r[i-1]
    ans = max(tmp, tmp - x + get_l_ac[n - i - 1], ans)

get_r_ac = list(itertools.accumulate(get_r, max))
x = 0
for i in range(n):
    tmp = 0
    if i > 0:
        x = xvl[i-1][0]
        tmp += get_l[i-1]
    ans = max(tmp, tmp - x + get_r_ac[n - i - 1], ans)

print(ans)
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = 0
for i in range(n):
  if a[i]>=b[i]:
    c+=int(b[i])
  else:
    if (a[i]+a[i+1])>=b[i]:
      c+=int(b[i])
      a[i+1]=a[i]+a[i+1]-b[i]
    else:
      c+=int(a[i]+a[i+1])
print(c)

### FIXED CODE ###

A, B=map(int,input().split())
k = (A+B)//2 
if (A+B)%2 == 0:
  print(k)
else:
  print("IMPOSSIBLE")
L = map(str, input().split())

s = L[0]
S = list(s)
t = L[1]
T = list(t)

N = len[S]
i = 1

while N != i:
    if S[i] != T[i]:
        S[i] = T[i]
    i += 1

### FIXED CODE ###

s,t = input(), input()

S = list(s)
T = list(t)

N = len(s) - 1
i = 0
counter = 0

while N + 1 != i:
    if S[i] != T[i]:
        S[i] = T[i]
        counter += 1
    i += 1

print(counter)
def adx(p,oya,tox,total):
  tox[p] += total
  total = tox[p]
  if(len(oya[p]) == 0):
    return 0

  else:
    for i in oya[p]:
      adx(i,oya,tox,total)

  return 0

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

oya = [ [] for i in range(n + 1)]
tox = [0 for i in range(n + 1)]

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

for i in range(q):
  p,x = map(int,input().split())
  tox[p] += x

_ = adx(1,oya,tox,0)

tox.pop(0)

print(*tox)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)

def addc(p,b):
  for i in e[p]:
    if(i == b):
      continue
    c[i] += c[p]
    addc(i,p)

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

e = [ [] for i in range(n + 1)]
c = [0]*(n+1)

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

for i in range(q):
  p,x = map(int,input().split())
  c[p] += x

addc(1,-1)

print(*c[1:])
n, m= map(int, (input().split()))
pyi = [list(map(int, (input().split()))) + [i] for i in range(m)]
pyi.sort(key=itemgetter(1))
pyi.sort(key=itemgetter(0))
cityflag = 0
ans = []
for rep in range(m):
    if pyi[rep][0] != pyi[rep - 1][0]:
        cityflag = 0

    cityflag += 1
    ans += [[pyi[rep][0] , cityflag, pyi[rep][2]]]

for i in sorted(ans, key=itemgetter(2)):
    print(str(i[0]).zfill(6) + str(i[1]).zfill(6))

### FIXED CODE ###

from operator import itemgetter

n, m= map(int, (input().split()))
pyi = [list(map(int, (input().split()))) + [i] for i in range(m)]
pyi.sort(key=itemgetter(1))
pyi.sort(key=itemgetter(0))
cityflag = 0
ans = []
for rep in range(m):
    if pyi[rep][0] != pyi[rep - 1][0]:
        cityflag = 0

    cityflag += 1
    ans += [[pyi[rep][0] , cityflag, pyi[rep][2]]]

for i in sorted(ans, key=itemgetter(2)):
    print(str(i[0]).zfill(6) + str(i[1]).zfill(6))
K, S = int(input().split(" "))

cnt = 0

for x in range(K+1):
  for y in range(K+1):
    for z in range(K+1):
      if x+y+z == S:
        cnt +=1

print(cnt)

### FIXED CODE ###

K, S = [int(n) for n in input().split(" ")]
 
cnt = 0
 
for x in range(K+1):
  for y in range(K+1):
      if S-x-y <= K and S-x-y >= 0:
            
        cnt +=1
 
print(cnt)
from math import ceil, floor

a, b = [int(c) for c in input()]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
	print(-1);


### FIXED CODE ###

from math import ceil, floor
 
a, b = [int(c) for c in input().split(" ")]
A = ceil(a / 0.08)
B = ceil(b/ 0.1)
 
if (A < B):
  if (floor(B * 0.08) == a):
    print(B)
  else:
    print(-1)
elif (B < A):
  if (floor(A*0.1) == b):
    print(A)
  else:
    print(-1)
else:
  print(A);
import fractions
from functools import reduce
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)

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

lcm_A = lcm_list(A)

B = [None]*N
for i in range(N):
    B[i] = lcm_A/A[i]

print(sum(B)%(10**9+7))

### FIXED CODE ###

import fractions
import functools
import sys

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

def lcm(*numbers):
    return functools.reduce(lcm_base, numbers, 1)
"""
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
"""
N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))

lcm_A = functools.reduce(lcm_base, A, 1)
B = [None]*N
B = [lcm_A//a for a in A]
#B[i] = lcm_A//A[i]

print(sum(B)%(10**9+7))
N = int(input())
A = list(map(int, input().split()))
a.sort()
Alice = 0
Bob = 0
for i in range(n):
  if i%2 == 0:
    Alice += A[i]
  else:
    Bob += A[i]
ans = Alice - Bob
print(ans)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
Alice = 0
Bob = 0
for i in range(N):
  if i%2 == 0:
    Alice += A[i]
  else:
    Bob += A[i]
ans = Alice - Bob
print(ans)
def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    # b = list(map(int, input().split()))
    b = [int(i) for i in input().split()] 
  else:
    # b = [1,2,1]
    # b = [2,2]
    b = [1,1,1,2,2,1,2,3,2]
    N = len(b)
    
  if check(b) != True:
    print(-1)
    
def check(B):
  # if 'get_ipython' in globals(): print(B)
  lenB = len(B)
  if lenB == 0 :
    return True
  else :
    maxB = max(B) + 1  
  # for i in reversed(range(lenB)):
  for i in reversed(range(0,maxB)):
    if B[i] == i+1:
      if check(B[:i]+B[(i+1):]) == True:
        print(B[i])
        return True
        break
    
main()

### FIXED CODE ###

import sys

def main():
  if 'get_ipython' not in globals():  
    # For Subsession
    N = int(input())
    b = [int(i) for i in input().split()] 
  else:
    # b = [1,2,1]
    # b = [2,2]
    b = [1,1,1,2,2,1,2,3,2]
    N = len(b)

  ans = []
  while True:
    for i in range(N-1,-1,-1):
      if b[i] == i+1:
        ans.append(i+1)
        del b[i]
        N = N -1
        break
      if i == 0:
        print(-1)
        sys.exit()
    if N == 0:
      break

  for i in reversed(ans):
    print(i)
    
main()
n = int(input())
l = []
for i in range(1, n // 2):
  if n % i == 0:
    l.append(i + n // i - 2)
print(min(l))

### FIXED CODE ###

import math
n = int(input())
l = []
for i in range(1, int(math.sqrt(n)) + 1):
  if n % i == 0:
    a = i
    b = n // i
    l.append(a + b - 2)
print(min(l))
s = list(input())
t = list(input())

ds = {}
dsl ={}
dt = {}
for i in range(len(s)):
    if s[i] not in ds.keys():    
        ds[s[i]] = 0
        dsl[s[i]] = []
    ds[s[i]]+=1
    dsl[s[i]].append(i)

for i in range(len(t)):
    if t[i] not in dt.keys():    
        dt[t[i]] = 0
    if t[i] not in ds.keys():
        ds[t[i]] = 0
    dt[t[i]]+=1

import bisect
ans = 1
now = 0
for i in range(len(t)):
    if ds[t[i]] == 0:
        print("-1")
        exit()
    elif ds[t[i]] == 1:
        if dsl[t[i]][0] > now:
            ans += (dsl[t[i]][0] - now)
        else:
            ans += dsl[t[i]][0]+1 +(len(s) - now - 1)
        now = dsl[t[i]][0] 
    else:
        index = bisect.bisect_right(dsl[t[i]],now)
        indexv = dsl[t[i]][index]
        if indexv > now:
            ans+= indexv - now
            now = indexv
        else:
            index = 0
            ans+= dsl[t[i]][index]+1 + (len(s) - now - 1)
            now = dsl[t[i]][index] 

print(ans)

### FIXED CODE ###

import bisect
s = list(input())
t = list(input())

ds = {}  # ｓに含まれる文字それぞれの数
dsl = {}  # ｓの文字の位置
for i in range(len(s)):
    if s[i] not in ds.keys():
        ds[s[i]] = 0
        dsl[s[i]] = []
    ds[s[i]] += 1
    dsl[s[i]].append(i)

for i in range(len(t)):
    if t[i] not in ds.keys():
        ds[t[i]] = 0

#print(ds, dsl)

ans = 0
now = -1
for i in range(len(t)):
    if ds[t[i]] == 0:  # ｓにｔを構成する文字がない場合
        print("-1")
        exit()
    elif ds[t[i]] == 1:
        if dsl[t[i]][0] > now:  # ｔの次の文字が現在地より右にある場合
            ans += (dsl[t[i]][0] - now)
        else:  # ｔの次の文字が現在地より左にある場合
            ans += dsl[t[i]][0] + (len(s) - now)
        now = dsl[t[i]][0]
    else:
        index = bisect.bisect_right(dsl[t[i]], now)
        if index == len(dsl[t[i]]):
            index = -1
        if dsl[t[i]][index] > now:  # ｔの次の文字が現在地より右にある場合
            ans += (dsl[t[i]][index] - now)
            now = dsl[t[i]][index]
        else:  # ｔの次の文字が現在地より左にある場合
            ans += dsl[t[i]][0] + (len(s) - now)
            now = dsl[t[i]][0]

print(ans)
M=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
O=input()
S=list(O)

if(len(O)!=26):
    for i in range(26):
        if(M[i] not in S):
            print(O,M[i],sep="")
            exit()

for i in range(24,-1,-1):
    for j in range(25,i,-1):
        if S[i]<S[j]:
            print(S[:i]+S[j])
            exit()

print(-1)



### FIXED CODE ###

s=input()
alp="".join([chr(i) for i in range(97,97+26)])
if len(s)<26:
    for i in alp:
        if i not in s:
            print(s+i)
            exit()
else:
    if s=="".join([chr(i) for i in range(97,97+26)][::-1]):
        print(-1)
        exit()
    else:
        for i in range(24,-1,-1):
            for j in range(25,i,-1):
                if s[i]<s[j]:
                    print(s[:i]+s[j])
                    exit()
N=int(input())
u = [0]*(N-1)
v = [0]*(N-1)
w = [0]*(N-1)
for i in range(N-1):
    u[i], v[i], w[i] = map(int, input().split())
    u[i] -= 1
    v[i] -= 1

class Path:
    def __init__(self, next_node, length, num):
        self.next=next_node
        self.len=length
        self.num=num

class Node:
    def __init__(self, index):
        self.index = index
        self.paths = []

    def append(self, next_node, length, num):
        self.paths.append(Path(next_node, length, num))

nodes = [Node(i) for i in range(N)]
for i in range(N-1):
    nodes[u[i]].append(v[i], w[i], i)
    nodes[v[i]].append(u[i], w[i], i)

past_paths = [0]*(N-1)
paints = [-1]*N

def rec(pos, color):
    if paints[pos] == -1:
        paints[pos] = color
    for path in nodes[pos].paths:
        # まだ通ってない道を通る
        if past_paths[path.num] == 0:
            past_paths[path.num] = 1
            rec(path.next, (color + path.len) % 2)
        # さっきの道を戻ってくる

rec(0, 0)

for i in paints:
    print(i)


### FIXED CODE ###

import sys

N=int(input())
sys.setrecursionlimit(100000)
u = [0]*(N-1)
v = [0]*(N-1)
w = [0]*(N-1)
for i in range(N-1):
    u[i], v[i], w[i] = map(int, input().split())
    u[i] -= 1
    v[i] -= 1

class Path:
    def __init__(self, next_node, length, num):
        self.next=next_node
        self.len=length
        self.num=num

class Node:
    def __init__(self, index):
        self.index = index
        self.paths = []

    def append(self, next_node, length, num):
        self.paths.append(Path(next_node, length, num))

nodes = [Node(i) for i in range(N)]
for i in range(N-1):
    nodes[u[i]].append(v[i], w[i], i)
    nodes[v[i]].append(u[i], w[i], i)

past_paths = [0]*(N-1)
paints = [-1]*N

def rec(pos, color):
    if paints[pos] == -1:
        paints[pos] = color
    for path in nodes[pos].paths:
        # まだ通ってない道を通る
        if past_paths[path.num] == 0:
            past_paths[path.num] = 1
            rec(path.next, (color + path.len) % 2)
        # さっきの道を戻ってくる

rec(0, 0)

for i in paints:
    print(i)
N = int(input())
A = [int(x) for x in input().split()]
ans = 0
index = [0] * N
max = 0
temp = [0] * (10**9 + 1)
for i in range(N):
    for d in range(1, int(A[i]/2)):
        if A[i] % d == 0:
            temp[d] += 1
    temp[A[i]+ 1] += 1
for i in range(N-1, 0, -1):
    if N - 1 <= temp[i]:
        ans = i
        break
print(ans)


### FIXED CODE ###

from fractions import gcd
N = int(input())
A = [int(s) for s in input().split()]
ans = 0
L = [0] * (N)
R = [0] * (N)
for n in range(0, N):
    if n != N-1:
        L[n+1] = gcd(A[n], L[n])
        R[-(n+2)] = gcd(A[-(n+1)], R[-(n+1)])
for n in range(0, N):
    temp = gcd(L[n], R[n])
    ans = max(temp, ans)
print(ans)
import math
import copy
from copy import deepcopy
import sys
import fractions
import numpy as np
from functools import reduce
# import statistics
import heapq
sys.setrecursionlimit(100001)

# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

data = getSomeInputListInt(n)

ans = [-1]*n

def searcher(num):
    for i in range(n-1):
        l = data[i][0]
        r = data[i][1]
        w = data[i][2]

        if l == num and ans[r-1] == -1:
            if w % 2 == 0:
                ans[r-1] = ans[num-1]
            else:
                ans[r-1] = (ans[num-1]+1) % 2
            searcher(r)

        if r == num and ans[l-1] == -1:
            if w % 2 == 0:
                ans[l-1] = ans[num-1]
            else:
                ans[l-1] = (ans[num-1]+1) % 2
            searcher(l)


l = data[0][0]
r = data[0][1]
w = data[0][2]

if w % 2 == 0:
    ans[r-1] = 0
    ans[l-1] = 0
else:
    ans[r-1] = 1
    ans[l-1] = 1

searcher(r)
searcher(l)

for a in ans:
    print(a)




### FIXED CODE ###

import math
import copy
from copy import deepcopy
import sys
import fractions
import numpy as np
from functools import reduce
# import statistics
import heapq
sys.setrecursionlimit(100001)

# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())


ans = [-1]*n

g = [[] for i in range(n)]
for i in range(n-1):
    u,v,w = map(int,input().split())
    u-=1;v-=1
    g[u].append([v,w])
    g[v].append([u,w])
ans = [-1]*n
def dfs(x,y):
    for i,j in g[x]:
        if ans[i] == -1:
            ans[i] = (y+j)%2
            dfs(i,y+j)
dfs(0,0)
for i in ans:
    print(i)
S2 = input()
T = input()

index = S2.find(T[0])
if index == -1:
    S = list('UNRESTORABLE')
elif len(S2) - index < len(T):
    S = list('UNRESTORABLE')
else:
    S = [None] * len(S2)
    for i in range(len(S)):
        if i > index:
            if S2[i] == T[i - index]:
                S[i] = S2[i]
            elif S2[i] == '?':
                S[i] = T[i - index]
            else:
                S = list('UNRESTORABLE')
        else:
            if S2[i] == '?':
                S[i] = 'a'
            else:
                S[i] = S2[i]
print(''.join(S))


### FIXED CODE ###

S2 = input()
T = input()

N = len(S2)


def check(S, T):
    for i in range(len(S)):
        if S[i] == '?' or S[i] == T[i]:
            continue
        else:
            return False
    return True


S = 'UNRESTORABLE'
if len(T) <= N:
    C = []
    for i in range(N - len(T) + 1):
        j = i + len(T)
        if (S2[i] == T[0] or S2[i] == '?') and check(S2[i:j], T):
            S = list(S2)
            S[i:j] = list(T)
            S = ''.join(S).replace('?', 'a')
            C.append(S)
    if len(C) > 0:
        S = sorted(C)[0]
print(S)
X,N = map(int,input().split())
if N>0:
    p = list(map(int,input().split()))
ans = []
for i in range(100):
    ans.append(X-i)
    ans.append(X+i)
import sys
for j in ans:
    if j not in p:
        print(j)
        sys.exit()

### FIXED CODE ###

X,N = map(int,input().split())
if N>0:
    p = list(map(int,input().split()))
else:
    p = []
ans = []
for i in range(100):
    ans.append(X-i)
    ans.append(X+i)
import sys
for j in ans:
    if j not in p:
        print(j)
        sys.exit()
import math
def total(n):
    return int((-1 + math.sqrt(1 + 8 * n)) / 2); 
def isPrime(n) : 
  
    # Corner cases 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True
  
def sieveOfEratosthenes(N, s): 
    prime = [False] * (N+1) 
    for i in range(2, N+1, 2):  
        s[i] = 2
    for i in range(3, N+1, 2): 
        if (prime[i] == False): 
              
            s[i] = i 
            for j in range(i, int(N / i) + 1, 2): 
                if (prime[i*j] == False): 
                    prime[i*j] = True 
                    s[i * j] = i 
  
def generatePrimeFactors(N): 

    s = [0] * (N+1) 
    sieveOfEratosthenes(N, s) 
    curr = s[N] 
    cnt = 1 
    tot = 0
    while (N > 1): 
        N //= s[N]
        if (curr == s[N]): 
            cnt += 1
            continue
        tot+=total(cnt)
        curr = s[N] 
        cnt = 1
    return tot
def sol():
    n = int(input())
    if n == 1:
        print(0)
        return
    if isPrime(n):
        print(1)
        return

    print(generatePrimeFactors(n))
    
sol()


### FIXED CODE ###

import math
from collections import Counter
def total(n):
    return int((-1 + math.sqrt(1 + 8 * n)) / 2); 
def isPrime(n) : 
  
    # Corner cases 
    if (n <= 1) : 
        return False
    if (n <= 3) : 
        return True
  
    # This is checked so that we can skip  
    # middle five numbers in below loop 
    if (n % 2 == 0 or n % 3 == 0) : 
        return False
  
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
  
    return True
  
def primeFactors(n): 
    tot = 0
    a = []
    while n % 2 == 0: 
        a.append(2)
        n = n / 2
          

    for i in range(3,int(math.sqrt(n))+1,2): 

        while n % i== 0: 
            a.append(i)
            n = n / i 

    if n > 2: 
        a.append(n)
    for i, j in Counter(a).items():
        tot+=total(j)
    return tot


def sol():
    n = int(input())
    if n == 1:
        print(0)
        return
    if isPrime(n):
        print(1)
        return

    print(primeFactors(n))
    
sol()