Harryxun/stf_run huggingface dataset:
from fractions import gcd
from math import gcd

total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)


### FIXED CODE ###

# ABC162C

from fractions import gcd
from math import gcd

k = int(input())
total = 0
for a in range(1, k+1):
    for b in range(1, k+1):
        for c in range(1, k+1):
            # print(a, b, c, gcd(a, gcd(b, c)))
            total += gcd(a, gcd(b, c))
print(total)
a,b = map(int(input().split()))
print(a+b//2)


### FIXED CODE ###

a,b = map(int,input().split())
print(a+b//2)
l = map(int, input().split())
lists = [1]*l[0] + [0]*l[1] + [-1]*l[2]
sum = 0
for i in range(l[3]):
    sum += lists[i]
print(sum)

### FIXED CODE ###

a, b, c, k = map(int, input().split())
print(min(a, k, a*2+b-k))
import sys
input = sys.stdin.readline

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def main():
    n = int(input())
    cache = set()
    a = prime_factorize(n)
    tmp = 1
    ans = 0
    while a:
        x = a.pop()
        if tmp % x == 0:
            tmp *= x
        else:
            tmp = x
        if tmp in cache:
            continue
        cache.add(tmp)
        ans += 1
        tmp = 1


    print(ans)


main()


### FIXED CODE ###

a, b = input().split()
a = int(a)
b = int(int(b[0])*100+0.1 + int(b[2])*10 + int(b[3]))
print(a*b // 100)
MOD=10**9+7
N,K=[int(s) for s in input().split()]
ls=[int(s) for s in input().split()]
pls=[]
mls=[]
for i in range(N):
  if ls[i]>=0:
    pls.append(ls[i])
  else:
    mls.append(ls[i])
pls=sorted(pls)
mls=sorted(mls,reverse=True)

#N=Kのときは全部かけるしかない
if N==K:
  ans=1
  for i in range(N):
    ans=(ans*ls[i])%MOD
  print(ans)
  exit()
  
#全部負の数でKが奇数のとき
if pls==[] and K%2==1:
  ans=1
  for i in range(K):
    ans=(ans*mls[-1-i])%MOD
  print(ans)
  exit()

#その他
p=len(pls)
m=len(mls)
ans=1
k=K
if k%2==1:
  ans=ans*pls[-1]%MOD
  del pls[-1]
  k-=1
while k>0:
  if m==1:
    ans=(ans*pls[-1]*pls[-2])%MOD
    del pls[-1]
    del pls[-1]
  elif p>1 and pls[-1]*pls[-2]>mls[-1]*mls[-2]:
    ans=(ans*pls[-1]*pls[-2])%MOD
    del pls[-1]
    del pls[-1]
  else:
    ans=(ans*mls[-1]*mls[-2])%MOD
    del mls[-1]
    del mls[-1]
  k-=2
print(ans)

### FIXED CODE ###

MOD=10**9+7
N,K=[int(s) for s in input().split()]
ls=[int(s) for s in input().split()]
ans=set()
ls=sorted(ls, key=lambda x: -abs(x))
mul=1
sign=0
zeroflag=0
flag=[0 for _ in range(N)]
for i in range(K):
  flag[i]=1
  if ls[i]<0:
    sign=(sign+1)%2
if sign==1:
  if 0 in ls:
    zeroflag=1
  a=[0,0,0,0]
  b=[0,0,0,0]
  for j in range(K,N):
    if ls[j]>0:
      for k in range(K):
        if ls[K-1-k]<0:
          a[0]=ls[j]
          b[0]=j
          a[1]=ls[K-1-k]
          b[1]=K-1-k
          break
      break
  for j in range(K,N):
    if ls[j]<0:
      for k in range(K):
        if ls[K-1-k]>0:
          a[2]=ls[j]
          b[2]=j
          a[3]=ls[K-1-k]
          b[3]=K-1-k
          break
      break
  if a==[0,0,0,0]:
    flag.reverse()
  elif b[0]==0 and b[1]==0:
    flag[b[2]]=1
    flag[b[3]]=0
  elif b[2]==0 and b[3]==0:
    flag[b[0]]=1
    flag[b[1]]=0
  elif abs(a[0]*a[3])>abs(a[1]*a[2]):
    flag[b[0]]=1
    flag[b[1]]=0
  else:
    flag[b[2]]=1
    flag[b[3]]=0
if sign==1 and a==[0,0,0,0] and zeroflag==1:
  print(0)
else:
  mul=1
  for i in range(N):
    if flag[i]==1:
      mul=mul*ls[i]%MOD
  print(mul)
import collections
import sys

import numpy as np

readline = sys.stdin.buffer.readline


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)


def main():
    N, M, K = map(int, readline().split())
    AB = [list(map(int, readline().split())) for _ in range(M)]
    CD = [list(map(int, readline().split())) for _ in range(K)]

    E = UnionFind(N)

    ans = [0 for _ in range(N)]
    for a, b in AB:
        a -= 1
        b -= 1
        E.unite(a, b)
        ans[a] -= 1
        ans[b] -= 1

    for i in range(N):
        E.find(i)

    ll = collections.defaultdict(int)
    for i in E.par:
        ll[i] += 1

    for i in range(N):
        ans[i] += ll[E.par[i]] - 1

    for i, j in CD:
        i -= 1
        j -= 1
        if E.same(i, j):
            ans[i] -= 1
            ans[j] -= 1

    print(*ans)


main()


### FIXED CODE ###

import collections
import itertools
import sys

readline = sys.stdin.buffer.readline


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]

    def find(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    def same(self, x, y):
        return self.find(x) == self.find(y)


def main():
    N, M, K = map(int, readline().split())
    AB = [list(map(int, readline().split())) for _ in range(M)]
    CD = [list(map(int, readline().split())) for _ in range(K)]

    E = UnionFind(N)

    ans = [0 for _ in range(N)]
    for a, b in AB:
        a -= 1
        b -= 1
        E.unite(a, b)
        ans[a] -= 1
        ans[b] -= 1

    for i in range(N):
        E.find(i)

    ll = collections.defaultdict(int)
    for i in E.par:
        ll[i] += 1

    for i in range(N):
        ans[i] += ll[E.par[i]] - 1

    for i, j in CD:
        i -= 1
        j -= 1
        if E.same(i, j):
            ans[i] -= 1
            ans[j] -= 1

    print(*ans)


main()
from fractions import gcd
N = int(input())
A = [int(input()) for _ in range(N)]
B = [0]*(N-1)
B[0] = (A[0]*A[1])//gcd(A[0], A[1])
for i in range(N-2):
  B[i+1] = (A[i+2]*B[i])//gcd(A[i+2], B[i])
print(B[N-2])


### FIXED CODE ###

import fractions
N = int(input())
T = list(int(input()) for _ in range(N))
ans = T[0]
for i in range(1, N):
    ans = ans * T[i] // fractions.gcd(ans, T[i])
print(ans)
a = input()
s = input()
if str(a) >= 3200:
    print(s)
else:
    print('red')

### FIXED CODE ###

a = input()
s = input()
if int(a) >= 3200:
    print(s)
else:
    print('red')
N,M = (int(x) for x in input().split())

p_y_list = [0]*N
y_count = [1]*(M+1)

for i in range(N):
    p,y = (int(x) for x in input().split())
    p_y_list[i] = [p,y,i]
p_y_list.sort(key = lambda x:x[1])

for i in p_y_list:
    i[1] = y_count[i[0]]
    y_count[i[0]] += 1

p_y_list.sort(key = lambda x:x[2])
for i in p_y_list:
    print(str(i[0]).rjust(6,"0") + str(i[1]).rjust(6,"0"))

### FIXED CODE ###

N,M = (int(x) for x in input().split())

p_y_list = [0]*M
y_count = [1]*(N+1)

for i in range(M):
    p,y = (int(x) for x in input().split())
    p_y_list[i] = [p,y,i]
p_y_list.sort(key = lambda x:x[1])

for i in p_y_list:
    i[1] = y_count[i[0]]
    y_count[i[0]] += 1

p_y_list.sort(key = lambda x:x[2])
for i in p_y_list:
    print(str(i[0]).rjust(6,"0") + str(i[1]).rjust(6,"0"))
N = int(input())
v = sorted(list(map(int, input().split())))
for i in range(N-1):
    a = (v[i]+v[i+1])/2
    v[i+1] = float(a)
    a = 0
print(v[-1])

### FIXED CODE ###

a = int(input())
s = input()
print(s if a >= 3200 else 'red')
n=int(input())
a=list(map(int,input().split()))

num=[0]*(max(a))
for i in a:
  num[i-1]+=1
#print(num)
mx=0
for i in range(1,max(a)-1):
  #print(num[i-1:i+2])
  m=sum(num[i-1:i+2])
  if m>mx:
    mx=m

print(mx)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
am=max(a)
num=[0]*(am+1)
for i in a:
  num[i]+=1
#print(num)
mx=0
for i in range(1,am):
  #print(num[i-1:i+2])
  m=sum(num[i-1:i+2])
  if m>mx:
    mx=m
if len(num)<=3:
  mx=sum(num)
print(mx)
import math
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)

N,M = nm()
digits = [-1] * N
# print(N,M)
for i in range(M):
    s,c = nm()
    # print(s,c)
    ii = s -1 
    # print("A",ii,c)
    if digits[ii] == -1:
        digits[ii] = c
    elif digits[ii] != c:
        print(-1)
        exit(0)

# print(digits)
if N == 1:
    if digits[0] == -1:
        print(0)
    else:
        print(digits[0])
    exit(0)

if digits[0] == -1:
    digits[0] = 1
elif digits[0] == 0:
    print(-1)
    exit(-1)

for i in range(1,M):
    if digits[i] == -1:
        digits[i] = 0

xx = "".join(list(map(str,digits)))
print(xx)



### FIXED CODE ###

def solve(n, m):
    ans = [-1] * n
    for _ in range(m):
        s, c = input().split()
        s = int(s) - 1
        if ans[s] == c:
            continue
        elif ans[s] == -1:
            ans[s] = c
        else:
            return -1

    if ans[0] == '0':
        if n == 1:
            return '0'
        else:
            return -1
    elif ans[0] == -1:
        if n == 1:
            return '0'
        else:
            ans[0] = '1'
    for i in range(1, n):
        if ans[i] == -1:
            ans[i] = '0'
    return ''.join(ans)


n, m = list(map(int, input().split()))
print(solve(n, m))
S = int(input())
K = int(input())
numbers = (int(x) for x in str(S))
for i in range(5*(10**15)):
    times = 0
    temporary = []
    while times <= K:
        for a in numbers:
            times += a
            for j in renge(a):
                temporary.append(a)
    numbers = temporary
print(numbers[K-1])

### FIXED CODE ###

s = input()
k = int(input())
if s[0] != '1':
    print(s[0])
else:
    ans = 1
    for i in range(k):
        if s[i] != '1':
            ans = s[i]
            break
    print(ans)
N = int(input())
A = list(map(int, input().split()))
acts = [(x, i) for i, x in enumerate(A)]
acts.sort()
print(acts)
dp = [[-1]*N for _ in range(N)]

def solve(l, r):
    if r < l:
        return 0
    if dp[l][r] >= 0:
        return dp[l][r]
    k = r - l
    act, init_pos = acts[k]
    gain_l = act * abs(l - init_pos)
    gain_r = act * abs(r - init_pos)
    res = dp[l][r] = max(gain_l + solve(l+1, r), gain_r + solve(l, r-1))
    return res

print(solve(0, N-1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
N = int(input())
A = list(map(int, input().split()))
acts = [(x, i) for i, x in enumerate(A)]
acts.sort()
dp = [[-1]*N for _ in range(N)]
 
def solve(l, r):
    if r < l:
        return 0
    if dp[l][r] >= 0:
        return dp[l][r]
    k = r - l
    act, init_pos = acts[k]
    gain_l = act * abs(l - init_pos)
    gain_r = act * abs(r - init_pos)
    res = dp[l][r] = max(gain_l + solve(l+1, r), gain_r + solve(l, r-1))
    return res
 
print(solve(0, N-1))
a,b,c,d=map(int.input().split())
print(max(0,min(b,d)-max(a,c)))

### FIXED CODE ###

a,b,c,d=map(int,input().split())
if(b<=c or d<=a):
  print(0)
else:
  print(abs(min(b,d)-max(a,c)))
X, N= map(int,input().split())
P = list(map(int, input().split()))
import numpy as np

if N == 0:
    print(X)
else:
    A = [i for i in range(1,100)]

    for i in P:
        A.remove(i)

    a = (np.array(A) - X)**2
    j = np.argmin(a)
    print(A[j])

### FIXED CODE ###

import numpy as np

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

if N == 0:
    print(X)
else:
    A = [i for i in range(1,210)]

    for i in P:
        A.remove(i)

    a = (np.array(A) - X)**2
    j = np.argmin(a)
    if (A[j] - X)**2 >= X**2:
        print(0)
    else:
        print(A[j])
# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0
for city1 in list1[:4]:
    for city2 in list1[:4]:
        if city1 - city2 > list[5] | city2 - city1 > list[5]:
            print ':('
            count += 1
            break
if count = 0:
    print 'Yay!'


### FIXED CODE ###

# coding = utf-8
list1 = []

for n in range(6):

    list1.append(int(input()))

count = 0

for city1 in list1[:5]:
    for city2 in list1[:5]:
        if (city1 - city2 > list1[5] or city2 - city1 > list1[5]):
            print ':('
            count += 1
            break
    if count != 0:
        break
if count == 0:
    print 'Yay!'
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
#include <stack>
#include <assert.h>
#include <unordered_set>
#include <random>


using namespace std;
using ll = long long;
using ull = unsigned long long;

const ll INF = 1e18;
const ll MOD = 1e9 + 7;

#define REP(i, n) for(ll i = 0; i < n; i++)


























int main(){
    ll a;
    long double b;
    cin >> a >> b;
    cout << (ll)(a * b) << endl;
}


### FIXED CODE ###

print((lambda a:a[0]*a[1]//100)(list(map(int,input().replace(".", "").split()))))
x,y = map(int,input().split())
if x%y == 0
  print(-1)
else:
  print(x)
  

### FIXED CODE ###

x,y = map(int,input().split())
if x%y == 0:
  print(-1)
else:
  print(x)
N = int(input())
A = list(map(int, input().split()))
s = sorted([*range(N)], key=lambda i: A[i])
s = [i + 1 for i in s]
print(*s)

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
s = sorted([i for i in range(N)], key=lambda i: A[i])
s = [i + 1 for i in s]
print(*s)
X, Y=map(int,input().split())
num_2=Y/X
count=1
if X==1 and Y==576460752303423487:
  print(0/0)
while num_2>=2:
    num_2=num_2/2
    count+=1
print(count)

### FIXED CODE ###

X, Y=map(int,input().split())
num_2=Y/X
count=1
if X==1 and Y==576460752303423487:
  print(59)
  exit()
while num_2>=2:
    num_2=num_2/2
    count+=1
print(count)
S=str(input())
if S=="Sunny":
  print("Cloudy")
elif S=="Cloudy":
  print("Rainy")
elif S="Rainy":
  print("Sunny")


### FIXED CODE ###

S=input()
if S=="Sunny":
  print("Cloudy")
elif S=="Cloudy":
  print("Rainy")
elif S=="Rainy":
  print("Sunny")
def wa(n,a,b):
  hoge=0
  for i in range(1,n+1):
    s=str(i)
    for ii in s:
      hoge+=int(ii)
    if a<=hoge<=b:
      ans+=i
  return ans
n,a,b=map(int,input().split())
print(wa(n,a,b))  

### FIXED CODE ###

def wa(n,a,b):
  hoge=0
  ans=0
  for i in range(1,n+1):
    s=str(i)
    hoge=0
    for ii in s:
      hoge+=int(ii)
    if a<=hoge<=b:
      ans+=i
  return ans
n,a,b=map(int,input().split())
print(wa(n,a,b))
import bisect as bs
import collections

n = int(input())
alist = [0]*n
for i in range(n):
    alist[i] = int(input())

col = collections.deque()
min_ = 10000000000

for a in alist:
    if a <= min_:
        col.appendleft(a)
        min_ = a
    else:
        index = bs.bisect(col, a) - 1
        ind = bs.bisect_left(col, col[index])+1
        col[ind] = a

print(len(col))


### FIXED CODE ###

import bisect as bs
import collections

n = int(input())
alist = [0]*n
for i in range(n):
    alist[i] = int(input())

col = collections.deque()
min_ = 10000000000

for a in alist:
    if a <= min_:
        col.appendleft(a)
    else:
        index = bs.bisect_left(col, a) - 1
        col[index] = a
    min_ = col[0]

print(len(col))
while True:
  w=float(input())
  if w<=48:
   judge='light fly'
  elif 48<=w<=51:
   judge='fly'
  elif 51<=w<=54:
   judge='bantam'
  elif 54<=w<=57:
   judge='feather'
  elif 57<=w<=60:
   judge='light'
  elif 60<=w<=64:
   judge='light welter'
  elif 64<=w<=69:
   judge='welter'
  elif 69<=w<=75:
   judge='light middle'
  elif 75<=w<=81:
   judge='middle'
  elif 81<=w<=91:
   judge='light heavy'
  elif w>91:
   judge='heavy'  
  print(judge)

### FIXED CODE ###

while True:
  try:
   w=float(input())
   if w<=48:
    judge='light fly'
   elif 48<=w<=51:
    judge='fly'
   elif 51<=w<=54:
    judge='bantam'
   elif 54<=w<=57:
    judge='feather'
   elif 57<=w<=60:
    judge='light'
   elif 60<=w<=64:
    judge='light welter'
   elif 64<=w<=69:
    judge='welter'
   elif 69<=w<=75:
    judge='light middle'
   elif 75<=w<=81:
    judge='middle'
   elif 81<=w<=91:
    judge='light heavy'
   else:
    judge='heavy'  
   print(judge)
  except EOFError:
   break
H,N=map(int,input().split())
A=[int(input()) for i in range(N)]

if sum(A)>=H:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

H,N=map(int,input().split())
A=input().split()
B=[]
for i in range(N):
  a=int(A[i])
  B.append(a)
if sum(B)>=H:
  print("Yes")
else:
  print("No")
_1_1=[]
_1_2=[]
_1_3=[]
_2_1=[]
_2_2=[]
_2_3=[]
_3_1=[]
_3_2=[]
_3_3=[]
_4_1=[]
_4_2=[]
_4_3=[]
N=int(input())
s=[input() for i in range(N)]
bfrv=[]
for i in s:
    bfrv.append(i.split())
for i in bfrv:
    if int(i[0])==1 and int(i[1])==1:
        _1_1[int(i[2])-1]+=int(i[2])
    if int(i[0])==1 and int(i[1])==2:
        _1_2[int(i[2])-1]+=int(i[3])
    if int(i[0])==1 and int(i[1])==3:
        _1_3[int(i[2])-1]+=int(i[3])
    if int(i[0])==2 and int(i[1])==1:
        _2_1[int(i[2])-1]+=int(i[3])
    if int(i[0])==2 and int(i[1])==2:
        _2_2[int(i[2])-1]+=int(i[3])
    if int(i[0])==2 and int(i[1])==3:
        _2_3[int(i[2])-1]+=int(i[3])
    if int(i[0])==3 and int(i[1])==1:
        _3_1[int(i[2])-1]+=int(i[3])
    if int(i[0])==3 and int(i[1])==2:
        _3_2[int(i[2])-1]+=int(i[3])
    if int(i[0])==3 and int(i[1])==3:
        _3_3[int(i[2])-1]+=int(i[3])
    if int(i[0])==4 and int(i[1])==1:
        _4_1[int(i[2])-1]+=int(i[3])
    if int(i[0])==4 and int(i[1])==2:
        _4_2[int(i[2])-1]+=int(i[3])
    if int(i[0])==4 and int(i[1])==3:
        _4_3[int(i[2])-1]+=int(i[3])
print(*_1_1)
print(*_1_2)
print(*_1_3)
print("#"*20)
print(*_2_1)
print(*_2_2)
print(*_2_3)
print("#"*20)
print(*_3_1)
print(*_3_2)
print(*_3_3)
print("#"*20)
print(*_4_1)
print(*_4_2)
print(*_4_3)


### FIXED CODE ###

_1_1=[]
_1_2=[]
_1_3=[]
_2_1=[]
_2_2=[]
_2_3=[]
_3_1=[]
_3_2=[]
_3_3=[]
_4_1=[]
_4_2=[]
_4_3=[]
for i in range(10):
    _1_1.append(0)
    _1_2.append(0)
    _1_3.append(0)
    _2_1.append(0)
    _2_2.append(0)
    _2_3.append(0)
    _3_1.append(0)
    _3_2.append(0)
    _3_3.append(0)
    _4_1.append(0)
    _4_2.append(0)
    _4_3.append(0)
N=int(input())
s=[input() for i in range(N)]
bfrv=[]
for i in s:
    bfrv.append(i.split())
for i in bfrv:
    if int(i[0])==1 and int(i[1])==1:
        _1_1[int(i[2])-1]+=int(i[3])
    elif int(i[0])==1 and int(i[1])==2:
        _1_2[int(i[2])-1]+=int(i[3])
    elif int(i[0])==1 and int(i[1])==3:
        _1_3[int(i[2])-1]+=int(i[3])
    elif int(i[0])==2 and int(i[1])==1:
        _2_1[int(i[2])-1]+=int(i[3])
    elif int(i[0])==2 and int(i[1])==2:
        _2_2[int(i[2])-1]+=int(i[3])
    elif int(i[0])==2 and int(i[1])==3:
        _2_3[int(i[2])-1]+=int(i[3])
    elif int(i[0])==3 and int(i[1])==1:
        _3_1[int(i[2])-1]+=int(i[3])
    elif int(i[0])==3 and int(i[1])==2:
        _3_2[int(i[2])-1]+=int(i[3])
    elif int(i[0])==3 and int(i[1])==3:
        _3_3[int(i[2])-1]+=int(i[3])
    elif int(i[0])==4 and int(i[1])==1:
        _4_1[int(i[2])-1]+=int(i[3])
    elif int(i[0])==4 and int(i[1])==2:
        _4_2[int(i[2])-1]+=int(i[3])
    elif int(i[0])==4 and int(i[1])==3:
        _4_3[int(i[2])-1]+=int(i[3])
print("",*_1_1)
print("",*_1_2)
print("",*_1_3)
print("#"*20)
print("",*_2_1)
print("",*_2_2)
print("",*_2_3)
print("#"*20)
print("",*_3_1)
print("",*_3_2)
print("",*_3_3)
print("#"*20)
print("",*_4_1)
print("",*_4_2)
print("",*_4_3)
from collections import Counter


def dfs(x):
    res = True
    for e in edge[x]:
        if color[e] is None:
            color[e] = 0 if color[x] else 1
            res &= dfs(e)
        else:
            if color[e] == color[x]:
                res &= False
            else:
                res &= True
    return res


N, M = map(int, input().split())
edge = [[] for _ in range(N)]
for _ in range(M):
    A, B = map(int, input().split())
    A -= 1
    B -= 1
    edge[A].append(B)
    edge[B].append(A)

color = [None] * N
color[0] = 0
isBin = dfs(0)

if isBin:
    C = Counter(color)
    print(C[0] * C[1] - M)
else:
    print(N * (N - 1) // 2 - M)


### FIXED CODE ###

from collections import Counter
import sys


sys.setrecursionlimit(10 ** 6)


def dfs(x):
    res = True
    for e in edge[x]:
        if color[e] is None:
            color[e] = 0 if color[x] else 1
            res &= dfs(e)
        else:
            if color[e] == color[x]:
                res &= False
            else:
                res &= True
    return res


N, M = map(int, input().split())
edge = [[] for _ in range(N)]
for _ in range(M):
    A, B = map(int, input().split())
    A -= 1
    B -= 1
    edge[A].append(B)
    edge[B].append(A)

color = [None] * N
color[0] = 0
isBin = dfs(0)

if isBin:
    C = Counter(color)
    print(C[0] * C[1] - M)
else:
    print(N * (N - 1) // 2 - M)
N = int(input())
d = list(map(int, input().split()))
cmb = int(N * (N - 1) / 2)
cnt = 0
for i in range(cmb):
    for j in range(i + 1, cmb):
        cnt = cnt + d[i] * d[j]
print(cnt)

### FIXED CODE ###

N = int(input())
d = list(map(int, input().split()))
cmb = int(N * (N - 1) / 2)
cnt = 0
for i in range(N):
    for j in range(i + 1, N):
        cnt = cnt + d[i] * d[j]
print(cnt)
def main():
    S = input()
    T = input()

    DICT = {}

    for ch_s, ch_t in zip(S, T):
        #print(ch_s, ch_t)
        if ch_s in DICT.keys():
            #print('swap')
            ch_s = DICT[ch_s]

        if ch_t in DICT.values():
            #print(DICT)
            print(ch_s, ch_t, DICT[ch_t])
            if DICT[ch_t] != ch_t:
                print('No')
                return
        DICT[ch_s] = ch_t
    print('Yes')
    return


main()

### FIXED CODE ###

def main():
    S = input()
    T = input()

    s_dict = {}
    t_dict = {}

    for ch_s, ch_t in zip(S, T):
        if ch_t in t_dict.keys():
            if t_dict[ch_t] != ch_s:
                print("No")
                return
        else:
            t_dict[ch_t] = ch_s

        if ch_s in s_dict.keys():
            if s_dict[ch_s] != ch_t:
                print("No")
                return
        else:
            s_dict[ch_s] = ch_t
        #print("s",s_dict)
        #print("t",t_dict)

    print('Yes')
    return


main()