Harryxun/stf_run huggingface dataset:
A=int(input())
B=int(input())
print(A*B)

### FIXED CODE ###

A,B=map(int,input().split())
print(A*B)
from itertools import accumulate

# bisectはどっちでも（どちらに等号をつけても）うまくいくっぽい
from bisect import bisect_right, bisect_left

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

# 累積和を前計算
cumsum = list(accumulate(A))
cumsum.insert(0, 0)  # out of index 対策


ans = float('inf')
# 真ん中を全探索
for i in range(2, N-1):  # 左側は最低2つ残さなきゃいけないから2から(0もあるので）、右も同じ理由でN-1
    # 左の真ん中
    Lmid = cumsum[i] / 2
    
    # 左真ん中がどこに入るべきか
    Lx = bisect_left(cumsum, Lx)
    
    # Lxまで取るのか、Lx-1まで取るのか（どこまで取ると望ましい値Lmidに近づくのか）
    # 左側がLmidに近づくと右側もLmidに近づく→差の絶対値が0に近づく
    if abs(cumsum[Lx-1] - Lmid) < abs(cumsum[Lx] - Lmid):
        Lmid -= 1


    # 右側処理（基本は左と同じ）
    Rmid = (cumsum[N] + cumsum[i]) / 2  # 3分探索に要領でcumsum[i]を加えてやる
    Rx = bisect_left(cumsum, Rmid)
    # 超えるべきか超えないべきか
    if abs(cumsum[Rx-1] - Rmid) < abs(cumsum[Rx] - Rmid):
        Rx -= 1
    
    
    # 左からLx個の和
    P = cumsum[Lx]
    
    # Lx番目+1から真ん中区切りiまでの和
    Q = cumsum[i]-cumsum[Lx]
    
    # 真ん中区切りのi+1番目からRx番目までの和
    R = cumsum[Rx]-cumsum[i]
    
    # Rx+1番目から最後まで
    S = cumsum[N]-cumsum[Rx]
    ans = min(ans, max(P, Q, R, S) - min(P, Q, R, S))

print(ans)


### FIXED CODE ###

from itertools import accumulate
from bisect import bisect_right
N = int(input())
A = list(map(int, input().split()))

# 累積和を前計算
cumsum = list(accumulate(A))
cumsum.insert(0, 0)

#print(cumsum)
ans = float('inf')
# 真ん中を全探索
for i in range(2, N-1):
    #print(A[:i], A[i:])
    # 左の真ん中
    LC = cumsum[i] / 2

    LX = bisect_right(cumsum, LC)
    #print(LX)
    # 超えるべきか超えないべきか
    if abs(cumsum[LX-1] - LC) < abs(cumsum[LX] - LC):
        LX -= 1

    # 右の真ん中
    RC = (cumsum[N] + cumsum[i]) / 2
    RX = bisect_right(cumsum, RC)
    # 超えるべきか超えないべきか
    if abs(cumsum[RX-1] - RC) < abs(cumsum[RX] - RC):
        RX -= 1

    P, Q, R, S = cumsum[LX], cumsum[i]-cumsum[LX], cumsum[RX]-cumsum[i], cumsum[N]-cumsum[RX]
    ans = min(ans, max(P, Q, R, S) - min(P, Q, R, S))

print(ans)
def resolve():
    X, Y, A, B, C = map(int, input().split())
    p = sorted(list(map(int, input().split())), reverse=True)
    q = sorted(list(map(int, input().split())), reverse=True)
    r = sorted(list(map(int, input().split())), reverse=True)
    pp, pq, pr = 0, 0, 0
    x, y = 0, 0
    ans = 0
    while X > 0 and Y > 0:
        while X > 0 and p[pp] > r[pr]:
            ans += p[pp]
            pp += 1
            X -= 1

        while Y > 0 and q[pq] > r[pr]:
            ans += q[pq]
            pq += 1
            Y -= 1
		
        if not X and not Y:
            break
        ans += r[pr]
        pr += 1
        if not X or X < Y:
            Y -= 1
        else:
            X -= 1

    print(ans)

resolve()

### FIXED CODE ###

def resolve():
    X, Y, A, B, C = map(int, input().split())
    p = sorted(list(map(int, input().split())), reverse=True)
    q = sorted(list(map(int, input().split())), reverse=True)
    r = sorted(list(map(int, input().split())), reverse=True)
    pre = sorted(p[:X] + q[:Y])
    for i in range(min(X + Y, C)):
        if pre[i] < r[i]:
            pre[i] = r[i]
        else:
            break
    print(sum(pre))

resolve()
n, m, x, y = map(int, input().split())
X = sorted(map(int, input().split()))
Y = sorted(map(int, input().split()))
for i in range(X[-1]:Y[0]):
  if x <= i < y:
    print("No War")
    exit()
print("War")

### FIXED CODE ###

n, m, x, y = map(int, input().split())
X = sorted(list(map(int, input().split())))
Y = sorted(list(map(int, input().split())))
for i in range(X[-1], Y[0]):
  if x <= i < y:
    print("No War")
    exit()
print("War")
S = input()
str_list = [*S]
even_str = str_list[0::2]
odd_str = str_list[1::2]
if ("L" in even_str):
  print('No')
elif ("R" in odd_str):
  print('No')
else:
  print('Yes')

### FIXED CODE ###

a = input()
if a == "Sunny":
  print("Cloudy")
elif a == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
s = input()
print("ABC") if a[1] == "R" else print("ARC")

### FIXED CODE ###

s = input()
print("ABC") if s[1] == "R" else print("ARC")
A = 1<=A<=100
B = 1<=B<=100
sum = A*B
print(sum)

### FIXED CODE ###

a, b =map(int,input().split())
print(a*b)
W,H,x,y,r = input().split()

if r =< x and x =< (W-r):
    if r =< y and y =< (H-r):
        print("Yes")
    else:
        print("No")
else:
    print("Yes")

### FIXED CODE ###

W, H, x, y, r = input().split()

if int(r) <= int(x) and int(x) <= int(W) - int(r):
    if int(r) <= int(y) and int(y) <= int(H) - int(r):
        print("Yes")
    else:
        print("No")

else:
    print("No")
s=list(input())
s=set(s)
s=list(s)
s.sort()
for i in range(26):
    if ord(s[i])-97!=i:
        if i==0:
            print("a")
            break
        print(chr(ord(s[i-1])+1))
        break
    if i==25:
        print("None")
        break

### FIXED CODE ###

s=list(input())
s=set(s)
s=list(s)
s.sort()
k=0
for i in range(26):
    if ord(s[i])-97!=i:
        if i==0:
            print("a")
            k=1
            break
        print(chr(ord(s[i-1])+1))
        break
    if i==25:
        print("None")
        k=1
        break
    if i==len(s)-1:
        print(chr(ord(s[-1])+1))
        break
n,m,k=map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

count = 0
spend = 0
ia = 0
ib = 0
while spend < k:
  if ia < n and A[ia] < B[ib]:
    spend += A[ia]
    ia += 1
    if ia == n:
      ia = n-1
  elif ib < m and A[ia] >= B[ib]:
    spend += B[ib]
    ib += 1
    if ib < m:
      ib = m-1
  elif ia == n-1:
    spend += B[ib]
    ib += 1
    if ib < m:
      ib = m-1
  elif ib == m-1:
    spend += A[ia]
    ia += 1
    if ia == n:
      ia = n-1
    
  count += 1
print(count-1)

### FIXED CODE ###

n,m,k=map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

b = [0] * (m+1)
for i in range(m):
  b[i+1] = b[i] + B[i]

from bisect import bisect_right

result = 0
a = k
for i in range(n+1):
  index = bisect_right(b, a)
  hon = (index - 1) + (i)
  result = max(result, hon)
  if i < n:
    a -= A[i]
  if a < 0:
    break
print(result)
s = input().split()
a = int(s[0]);
b = int(s[1][0:1]+s[2:len(s[1])])
b *= 100
print(a*b//100)


### FIXED CODE ###

s = list(input().split())
a = int(s[0]);
b = int(s[1][:1]+s[1][2:])
print(a*b//100)
n, m = map(int, input().split())
danger = list(int(input()) for _ in range(m))
danger = [0] + danger + [n]
def fibo(n):
    memo = [-1]*(n+1)
    def _fibo(n):
        if memo[n] != -1:
            return memo[n]
        else:
            if n <= 1:
                memo[n] = n
                return memo[n]
            else:
                memo[n] = _fibo(n-1) + _fibo(n-2)
                return memo[n]
    return _fibo(n)
ans = 1
for j in range(m+1):
    if danger[j+1] - danger[j] ==1:
        ans *= 0
    else:
        ans *= fibo(danger[j+1] - danger[j] )
print(ans)

### FIXED CODE ###

n, m = map(int, input().split())
alis = list(int(input()) for _ in range(m))
dp = [-1]*(n+1)
mod = 10**9 + 7
for i in alis:
    dp[i] = 0
dp[0] = 1
dp[1] = 1 if 1 not in alis else 0
for i in range(2,n+1):
    if dp[i] == -1:
        dp[i] = (dp[i-1] + dp[i-2]) % mod
print(dp[n])
import numpy as np

N = int(input())

t = [int(x) for x in input().split()]

t = np.array(t).reshape(N, 1)
A = np.eye(N, N)
A[:-1, :] += A[1:, :]
A[N-1, 0] = 1

t = 2*np.dot(np.linalg.inv(A), t)

for i in range(N-1):
	print(int(t[i]), end=' ')
print(int(t[N-1]))



### FIXED CODE ###

N=int(input())
X=list(map(int,input().split()))
Y=[0]*N
S=sum(X)

Y[0]=S-2*sum([X[i] for i in range(N) if i%2==1])

for i in range(N-1):
	Y[i+1]=2*X[i]-Y[i]

print(*Y)
N = int(input())
 
S = list(map(int, input().split()))
 
color = [0, 0, 0, 0]
 
for s in S:
  if (color.count(0) == 0):
    print("Four")
    break
  
  if (s == "P"):
    color[0] += 1
  elif (s == "G"):
    color[1] += 1
  elif (s == "W"):
    color[2] += 1
  else:
    color[3] += 1
  
if (color.count(0) == 1):
  print(Three)

### FIXED CODE ###

N = int(input())

ans = N / 3
print(int(ans))
# 初期入力
import sys
input = sys.stdin.readline
T =list(input().strip())
if T[0] =="?":
    if T[1] =="?":
        T[0:2] ="PD"
    elif T[1] =="D":
        T[0] ="P"
    else:
        T[0] ="D"


for i in range(1,len(T)-1):
    if T[i] =="?":
        if T[i-1] =="P":
            T[i] ="D"
        if T[i-1] =="D" and T[i+1] =="D":
            T[i] ="P"
        if T[i-1] =="D" and T[i+1] =="P":
            T[i] ="D"
        if T[i-1] =="D" and T[i+1] =="?":
            T[i] ="P"

if T[-1] =="?":
    T[-1] ="D"

print("".join(T))

### FIXED CODE ###

# 初期入力
import sys
input = sys.stdin.readline
T =list(input().strip())

    
if T[0] =="?":
    if len(T) ==1 :
        T[0] ="D"
    elif T[1] =="?":
        T[0] ="P"
        T[1] ="D"
    elif T[1] =="D":
        T[0] ="P"
    else:
        T[0] ="D"


for i in range(1,len(T)-1):
    if T[i] =="?":
        if T[i-1] =="P":
            T[i] ="D"
        if T[i-1] =="D" and T[i+1] =="D":
            T[i] ="P"
        if T[i-1] =="D" and T[i+1] =="P":
            T[i] ="D"
        if T[i-1] =="D" and T[i+1] =="?":
            T[i] ="P"

if T[-1] =="?":
    T[-1] ="D"

print("".join(T))
# -*- coding: utf-8 -*-
#ABC120C

import sys
#import math

hoge = input()
#hoge=[]
#for i in range(0,len(tmp)):
#	hoge.append(tmp[i])
#hoge = list(map(lambda a: int(a), tmp))

n = len(hoge)

sum=0
i=0
while(1):
#	print(i)
	if(hoge[i]!=hoge[i+1]):
#		print("hoge:{} i:{} {} {}".format(hoge,i,hoge[i],hoge[i+1]))
		newhoge=hoge[0:i]+hoge[i+2:n]
		hoge = newhoge
		i=max(i-2,-1)
		n=len(hoge)
		sum+=2
#	print(i)
#	print("---")
	i+=1
	if(i>=n-1):
		break


print(sum)


### FIXED CODE ###

# -*- coding: utf-8 -*-
#ABC120C

import sys
#import math

hoge = input()
n = len(hoge)

sum=0
i=0

while(1):
#	print(i)
	if(i>=n-1):
		break
	if(hoge[i]!=hoge[i+1]):
#		print("hoge:{} i:{} {} {}".format(hoge,i,hoge[i],hoge[i+1]))
		newhoge=hoge[0:i]+hoge[i+2:n]
		hoge=newhoge
		i-=1
		if(i<0):
			i=0
		n-=2
#		n=len(hoge)
		sum+=2
	else:
		i+=1


#	print(i)
#	print("---")


print(sum)
# import math
import bisect
import numpy as np
mod = 10**9 + 7

# http://cav-inet.hateblo.jp/entry/2017/02/18/165141
def binary_search(list,target): 

	result = -1
	left = 0
	right = len(list) - 1

	while left <= right:
		center = (left + right)//2
		if list[center] == target:
			result = center
			break
		elif list[center] < target:
			left = center + 1
		elif list[center] > target:
			right = center - 1

	if result == -1:
		return False
	else:
		return True

n = int(input())
a = list(map(int,input().split()))
c = np.cumsum(a)
s = c[n-1]

if binary_search(c, c[n-1]/2):
    print(0)
    exit()

i = bisect.bisect_left(c, c[n-1]/2)
ans = min(2*c[i]-s, s - c[i-1]-1)
print(ans)


### FIXED CODE ###

def award(x):
    return max(0, 4*(10**5) - x*(10**5))

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

ans  = award(x)
ans += award(y)

if x == 1 and y == 1:
    ans += 4*(10**5)

print(ans)
r,g,b=map(int,input().split())

x = 10*g + b

if x%4 == 0 :
  print("YES")
  
else
  print("NO")

### FIXED CODE ###

r,g,b=map(int,input().split())

x = 10*g + b

if x % 4 == 0:
  print("YES") 
else:
  print("NO")
N, u, v = (int(i) for i in input().split())
adj=[]
for i in range(N+1):adj.append([])
for i in range(N-1):
	a,b = map(int,input().split())
	adj[a]+=[b]
	adj[b]+=[a]
	
prof = [0]*(N+1)
haut = [0]*(N+1)
parent = [-1]*(N+1)

def enraciner(sommet):
	for s in adj[sommet]:
		if s!=parent[sommet]:
			parent[s] = sommet
			prof[s] = 1+prof[sommet]
			enraciner(s)
	haut[sommet] = 1
	tmp = [haut[s]for s in adj[sommet] if s!=parent[sommet]]
	if tmp: haut[sommet]+=max(tmp)

enraciner(v)

# ~ print("parent",parent)
# ~ print("haut",haut)
# ~ print("prof",prof)

ans = 0

#montee
pu = prof[u]
pv = prof[v]
m = (pu - pv -1)//2
pu-=m
pv+=m
# ~ print("m",m)
ans+=m
for i in range(m):
	u = parent[u]

mx = 0
if len(adj[u])>1:mx = max(haut[i] for i in adj[u] if i!= parent[u])
# ~ print("mx",mx)
ans+= mx

last = (pu-pv)//2
# ~ print("last",last)
ans+=last

print(ans)



### FIXED CODE ###

N, u, v = (int(i) for i in input().split())
adj=[]
for i in range(N+1):adj.append([])
for i in range(N-1):
	a,b = map(int,input().split())
	adj[a]+=[b]
	adj[b]+=[a]

def distances(sommet):
	d = [-1]*(N+1)
	File = [sommet]
	d[sommet] = 0
	while File:
		s = File.pop()
		for x in adj[s]:
			if d[x]==-1:
				d[x] = 1+d[s]
				File.append(x)
	return d


t = distances(u)
a = distances(v)

# ~ print(t)
# ~ print(a)

ans = -1
for i in range(1,N+1):
	if t[i]<a[i]:
		ans = max(ans, a[i]-1)
		
print(ans)
import math
num_max = 100000
isPrimeNum = [True for i in range(0,num_max)]

isPrimeNum[0] == False
isPrimeNum[1] == False

for i in range(2, int(math.sqrt(num_max))):
    if isPrimeNum[i] == True:
        for j in range (i**2, num_max, i):
            isPrimeNum[j] = False
        


num_len = int(input())
cnt = 0

for i in range(num_len):
    num = int(input())
    if isPrimeNum[num]==True:
        cnt = cnt + 1

print(str(cnt))

### FIXED CODE ###

def isPrimeNum(in_num):
    if in_num <= 1:
        return False
    elif in_num == 2:
        return True
    elif in_num % 2 == 0:
        return False
    else:
        if pow(2, in_num-1, in_num) == 1:
            return True
        else:
            return False


num_len = int(input())
cnt = 0
for i in range(num_len):
    num = int(input())
    if isPrimeNum(num)==True:
        cnt = cnt + 1

print(str(cnt))
l,r=map(int,input().split())
print("Left"if l>r else "Balanced"if l==r else "Right")

### FIXED CODE ###

a,b,c,d=map(int,input().split())
print("Left"if a+b>c+d else "Balanced"if a+b==c+d else "Right")
s=input()

k=""

m=len(s)

for i in range(m):
  if i!="B":
    k+=i
  else:
    k[:-1]
print(k)



### FIXED CODE ###

s=input()

k=""

for i in s:
  if i!="B":
    k += i
  else:
    k=k[:-1]
print(k)
N, M = list(map(int, input().split()))

for i in range(M-N):
  k = i + N
  if M % k == 0:
    print(int(M/k))
    tmp=1
    break

if tmp==1:
  else:
    print(1)

### FIXED CODE ###

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

if N==1:
  print(M)
  tmp=1
else:
  for i in range(int(M**0.8)+1):
    k = i + N
    if M % k == 0:
      print(int(M/k))
      tmp=1
      break

if tmp==0:
  print(1)
from fractions import gcd

n,m=map(int,input().split())
s=input()
t=input()
l=n*m//gcd(n,m)
x=[0]*l
ans=l
for i in range(n):
    x[i*(l//n)]=s[i]
for j in range(m):
    if x[j*(l//m)]!=0:
        if x[j*(l//m)]!=t[j]:
            ans=-1
            break
print(ans)

### FIXED CODE ###

from fractions import gcd

n,m=map(int,input().split())
s=input()
t=input()
x=gcd(n,m)
l=n*m//gcd(n,m)
for i in range(x):
    if s[i*(n//x)]!=t[i*(m//x)]:
        print(-1)
        exit()
print(l)
import queue
import itertools
r,c=map(int,input().split())
s=[list(input()) for i in range(r)]
ans=0
for i1 in range(r):
    for i2 in range(c):
        p=0
        a=[[s[j][i] for i in range(c)] for j in range(r)]
        sy,sx=i1,i2
        if a[sy][sx]=="#":
            break
                #print(sy,sx,gy,gx)
        q = queue.Queue()
        d=[(-1,0),(1,0),(0,-1),(0,1)]
        a[sy][sx]=0
        for i in d:
            if 0<=sy+i[0]<r and 0<=sx+i[1]<c and a[sy+i[0]][sx+i[1]]==".":
                a[sy+i[0]][sx+i[1]]=1
                q.put((sy+i[0],sx+i[1]))
        while not q.empty():
            y,x=q.get()
            for i in d:
                if 0<=y+i[0]<r and 0<=x+i[1]<c and a[y+i[0]][x+i[1]]==".":
                    p=a[y][x]+1
                    q.put((y+i[0],x+i[1]))
                ans=max(p,ans)
print(ans)



### FIXED CODE ###

import queue
import itertools
r,c=map(int,input().split())
s=[list(input()) for i in range(r)]
ans=0
for i1 in range(r):
    for i2 in range(c):
        p=0
        a=[[s[j][i] for i in range(c)] for j in range(r)]
        sy,sx=i1,i2
        if a[sy][sx]=="#":
            continue
                #print(sy,sx,gy,gx)
        q = queue.Queue()
        d=[(-1,0),(1,0),(0,-1),(0,1)]
        a[sy][sx]=0
        for i in d:
            if 0<=sy+i[0]<r and 0<=sx+i[1]<c and a[sy+i[0]][sx+i[1]]==".":
                a[sy+i[0]][sx+i[1]]=1
                q.put((sy+i[0],sx+i[1]))
        while not q.empty():
            y,x=q.get()
            for i in d:
                if 0<=y+i[0]<r and 0<=x+i[1]<c and a[y+i[0]][x+i[1]]==".":
                    a[y+i[0]][x+i[1]]=a[y][x]+1
                    q.put((y+i[0],x+i[1]))
        for i in range(r):
            for j in range(c):
                if type(a[i][j])==int:
                    p=max(p,a[i][j])
        ans=max(p,ans)
print(ans)
n = int(input())
print(sum(n)-sum(n/3)*3-sum(n/5)*5+sum(n/15)*15)

### FIXED CODE ###

n = int(input())
s = 0
for i in range(1, n+1):
    if i % 15 == 0:
        pass
    elif i % 3 == 0:
        pass
    elif i % 5 == 0:
        pass
    else:
        s += i
print(s)
dic = {'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15}
x, y = map(str, input().split())

if dic[x] < dic[y]:
    print('<')

elif dic[x] = dic[y]:
    print('=')

else:
    print('>')

### FIXED CODE ###

dic = {'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15}
x, y = map(str, input().split())

if dic[x] < dic[y]:
    print('<')

elif dic[x] == dic[y]:
    print('=')

else:
    print('>')
N,R = map(int,input().split())
print(R if N >= 10 else R+{100*(10-K)})


### FIXED CODE ###

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

print(R if N >= 10 else R + 100*(10-N))
A, B = B, A
A, C = C, A

print(f'{A} {B} {C}')



### FIXED CODE ###

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


A, B = B, A
A, C = C, A

print('{} {} {}'.format(A, B, C))
import  numpy as np
N=int(input())
A=list(map(int,input().split()))

B=np.argsort(A)+1

print(' '.join(map(str,B)))


### FIXED CODE ###

import numpy as np
N=int(input())
A=list(map(int,input().split()))

B=np.argsort(A)+1

print(' '.join(map(str,B)))
inputs= list(input().split())
A=int(inputs[0])
B=int(float(inputs[1]+0.5)*100)
Ans=A*B/100
print(Ans)


### FIXED CODE ###

inputs= list(input().split())
A=int(inputs[0])
B=float(inputs[1])
B=int(B*100+0.5)
Ans=A*B//100
print(Ans)
from collections import Counter

print(len(Counter([int(input()) for i in range(3)])))


### FIXED CODE ###

# A
from collections import Counter

print(len(Counter([int(i) for i in input().split()])))
sum = 0
n = int(input())
l = [list(map(int, input().split()) for i in range(3))]

for i in range(n):
  sum += l[1][i]
  if l[0][i+1] == l[0][i]+1:
    sum += l[2][i]

print(sum)

### FIXED CODE ###

sum = 0
n = int(input())
l = [list(map(int, input().split())) for i in range(3)]

for i in range(n-1):
  sum = sum + l[1][i]
  if l[0][i+1] - l[0][i] == 1:
    sum = sum + l[2][l[0][i]-1]
sum = sum + l[1][n-1]
print(sum)
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

### FIXED CODE ###

n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)
N = int(input())
p = list(map(int, input().split()))
c = 0
for i in range(1, N+1):
    if i == p[i]:
        c += 1
if c == 0 or c == 2:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

N = int(input())
p = list(map(int, input().split()))
c = 0
for i in range(1, N+1):
    if i != p[i-1]:
        c += 1
if c == 0 or c == 2:
    print("YES")
else:
    print("NO")
N,X,D=map(int,input().split())
M=10**8
D+=(D<1)*M**3
f,c,r={},[0]*M,0
for x,y,z in sorted((((N-k)*j+~-k)*k//2+k*X//D,j,k*X%D)for k in range(N+1)for j in[0,2]):
 x=x*(D<M**3)
 if c[z]+y<1:
  f[z]=x
 r+=(x-f[z]+1)*(c[z]<y)
 c[z]-=y-1
print(r)

### FIXED CODE ###

N, X, D = map(int, input().split())
if D == 0:
    r = N+1
    if X == 0:
        r = 1
    print(r)
else:
    if D < 0:
        X, D = -X, -D
    d = dict()
    for k in range(N+1):
        M = (k*X) % D
        F = (k*X)//D + ((k-1)*k)//2 #(1..k-1)
        L = (k*X)//D + (2*N-k-1)*k//2# (N-k..N-1)
        if M not in d:
            d[M] = list()
        d[M].append((F, 0))
        d[M].append((L, 1))
    r = 0
    for m in d:
        d[m] = sorted(d[m])
        fc = 0
        f = 0
        for x in d[m]:
            if not x[1]:
                fc += 1
                if fc == 1:
                    f = x[0]
            if x[1]:
                fc -= 1
                if fc == 0:
                    r += x[0] - f + 1
    print(r)
A, B, C, D = map(int, list(input()))


def check():
    for i in [1, 0]:
        total = A
        if i:
            total += B
        else:
            total -= B
        for j in [1, 0]:
            if j:
                total += C
            else:
                total -= C
            for k in [1, 0]:
                if k:
                    total += D
                else:
                    total -= D
    
                if total == 7:
                    return [i, j, k]

S = []
for s in check():
    if s:
        S.append("+")
    else:
        S.append("-")

print(f"{A}{S[0]}{B}{S[1]}{C}{S[2]}{D}=7")

### FIXED CODE ###

nums = list(map(int, list(input())))

flag = 7
while flag >= 0:
    S = []
    total = nums[0]
    bin_str = format(flag, "03b")
    for i, bit in enumerate(bin_str, 1):
        if int(bit):
            total += nums[i]
            S.append("+")
        else:
            total -= nums[i]
            S.append("-")
    if total == 7:
        break
    
    flag -= 1
print(f"{nums[0]}{S[0]}{nums[1]}{S[1]}{nums[2]}{S[2]}{nums[3]}=7")
a = map(int, input().split())
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if ((a[0] == a[1]) and (a[2] == a[1])):
    print("No")
  else:
    print("Yes")
else:
  print("No)

### FIXED CODE ###

a = list(map(int, input().split()))
if ((a[0] == a[1]) or (a[0] == a[2]) or (a[2] == a[1])):
  if ((a[0] == a[1]) and (a[2] == a[1])):
    print("No")
  else:
    print("Yes")
else:
  print("No")
def prime_sieve(n):
    if n == 1:
        return []
    else:
        x = list(range(2,n+1))
        y = []
        while x[0]<pow(n,1/2):
            y += [x[0]]
            a = x[0]
            for i in x:
                if i % a == 0:
                    del x[x.index(i)]
        for i in x:
            y += [i]
        return y

n = int(input())
ans = 0
for i in prime_sieve(n):
    count = 1
    while n%i == 0:
        n /= i
        count -= 1
        loop = 1
        if count == 0:
            ans += 1
            loop += 1
            count = loop


print(ans)

### FIXED CODE ###

n = int(input())

ans = 0
for i in range(2,int(n**0.5)+1):
    count = 1
    loop = 1
    while n % i == 0:
        n = int(n/i)
        count -= 1
        if count == 0:
            ans += 1
            loop += 1
            count = loop

if n > 1:
    ans += 1
print(ans)