Harryxun/stf_run huggingface dataset:
n = int(input())
s = []
for i in range(n):
  s.append(input())

b = [False]*n
ans = 0
count = 1

for i in range(n):
  if b[i]:
    continue
  for j in range(i+1, n):
    if ana(s[i], s[j]):
      count += 1
      b[j] = True
  ans += count * (count-1) / 2
  count = 1
  b[i] = True
  
print(ans)
  
def ana(s1, s2):
  b = [False] * len(s1)
  for i in range(len(s1)):
    for j in range(len(s2)):
      if b[j]:
        continue
      if s1[i] == s2[j]:
        b[j] = True
  for i in range(len(s1)):
    if not b[i]:
      return False
  return True

### FIXED CODE ###

n = int(input())
s = []
for i in range(n):
    s.append(''.join(sorted(list(input()))))
s.sort()

ans = 0
count = 1
s_pre = s[0]

for i in range(1, n):
    if s_pre == s[i]:
        count += 1
    else:
        ans += int(count * (count - 1) / 2)
        s_pre = s[i]
        count = 1

ans += int(count * (count - 1) / 2)
print(int(ans))
N, M ,K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

Sa = [0]*N
Sb = [0]*M
Sa[0] = A[0]
Sb[0] = B[0]
a = 0
b = 0
if Sa[0] > K:
    a = 0
else: 
    for i in range(1, N):
        Sa[i] = Sa[i-1] + A[i]
        if Sa[i] > K:
            a = i
            break
    else:
        a = N
if Sb[0] > K:
    b = 0
else:
    for i in range(1, M):
        Sb[i] = Sb[i-1] + B[i]
        if Sb[i] > K:
            b = i
            break
    else:
        b = M

ans = max(a, b)
for i in range(a):
    temp = K - Sa[i]
    if i+1+b =< ans:
        break
    for j in range(b):
        if Sb[j] > temp:
            ans = max(ans, i+1+j)
            break
    else:
        ans = max(ans, i+1+b)
print(ans)


### FIXED CODE ###

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

Sa = [0]*(N+1)
Sb = [0]*(M+1)
Sa[0] = 0
Sb[0] = 0
for i in range(N):
    Sa[i+1] = Sa[i] + A[i]
for i in range(M):
    Sb[i+1] = Sb[i] + B[i]
ans = 0
for i in range(N+1):
    if Sa[i] > K:
        break
    for j in range(M, -1, -1):
        if Sa[i]+Sb[j] <= K:
            ans = max(ans, i+j)
            M = j
            break
    else:
        ans = max(ans, i)
print(ans)
import math
import string
import collections
from collections import Counter
from collections import deque


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]

H, W = map(int, input().split())
s = [None]*H
for i in range(H):
    s[i] = input()
d = deque()
d.append((0, 0))
while(len(d) != 0):
    g, r = d.popleft()
    if s[g][r] == '#':
        if g != 0 and s[g-1][r] == '#':
            d.append((g-1, r))
        else:
            print('No')
            break
        if g != H-1 and s[g+1][r] == '#':
            d.append((g+1, r))
        else:
            print('No')
            break
        if r != 0 and s[g][r-1] == '#':
            d.append((g, r-1))
        else:
            print('No')
            break
        if r != W-1 and s[g][r+1] == '#':
            d.append((g, r+1))
        else:
            print('No')
            break
    print('Yes')


### FIXED CODE ###

def readints():
    return list(map(int, input().split()))


a, b = map(int, input().split())
if a == b:
    print(a)
    exit()
if a > b:
    print(a-1)
if a < b:
    print(a)
N = input()
A = map(int, input().split())
even = []
count = []
for x in A:
    if x % 2 == 0:
        even.append(x)
for x in even:
    if x%3 == 0 or x%5 == 0:
        count += 1
if count == len(even):
    print("Approved")
else:
    print("Denied")


### FIXED CODE ###

n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")
#!/usr/bin/env python3
import sys


def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(K[0:K+1], "...", sep='')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(K, S)

if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3

import sys

def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(S[0:K], "...", sep='')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(K, S)

if __name__ == '__main__':
    main()
import sys
read=sys.stdin.read

n,*a=map(int,read().split())
l=[0]*max(a)
for i in a:
  l[a]^=1
print(sum(l))


### FIXED CODE ###

import sys
from collections import Counter
read=sys.stdin.read

n,*a=map(int,read().split())
x=Counter(a)
print(sum(list(map(lambda n:n%2, list(x.values())))))
a, b = map(int, input().split())

print(int((a + b) / 2　+ 0.9))



### FIXED CODE ###

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

print(int((a + b) / 2 + 0.9))
N,M =map(int,input().split())
list_aaa = list(map(int,input().split()))

list_aaa = sorted(list_aaa)
list_aaa_range = []

for i in range(M-1):
    list_aaa_range.append(list_aaa[i+1]-list_aaa[i])

list_aaa_range = sorted(list_aaa_range)

for i in range(1,N):
    list_aaa_range.pop(-1)

print(sum(list_aaa_range))

### FIXED CODE ###

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

list_aaa = sorted(list_aaa)
list_aaa_range = []

for i in range(M-1):
    list_aaa_range.append(list_aaa[i+1]-list_aaa[i])

list_aaa_range = sorted(list_aaa_range)

for i in range(1,N):
    if not list_aaa_range :
        list_aaa_range.append(0)
    else:
        list_aaa_range.pop(-1)

print(sum(list_aaa_range))
# E - All-you-can-eat
n,t=map(int,input().split())
a,b=[],[]
for i in range(n):
    aa,bb=map(int,input().split())
    a.append(aa)
    b.append(bb)

dp=[[0]*(2*t+1) for i in range(n+1)]

for i in range(n):
    for j in range(1,2*t+1):
        # if j-a[i]>=0:
        #     dp[i+1][j]=max(dp[i+1][j],dp[i][j-a[i]]+b[i])
        # dp[i+1][j]=max(dp[i+1][j],dp[i][j])
        if j-a[i]>=0:
            dp[i+1][j]=max(dp[i+1][j],dp[i][j-a[i]]+b[i])
        dp[i+1][j]=max(dp[i+1][j],dp[i][j])
# print(dp)
# print(dp[10][124])
a_max=max(a)
ans=0
if t+a_max-1>2*t:
    print(dp[n][sum(a)])
    exit()

for i in range(t-a_max-1,t+a_max-2):
    ans=max(dp[n][i],ans)

print(ans)


### FIXED CODE ###

# E - All-you-can-eat
n,t=map(int,input().split())
a,b=[],[]
for i in range(n):
    aa,bb=map(int,input().split())
    a.append(aa)
    b.append(bb)

dp1=[[0]*t for _ in range(n+1)] # 前から
dp2=[[0]*t for _ in range(n+1)] # 後ろから
arev=a[::-1]
brev=b[::-1]

for i in range(1,n+1):
    for j in range(t):
        if j-a[i-1]>=0:
            dp1[i][j]=max(dp1[i-1][j-a[i-1]]+b[i-1],dp1[i-1][j])
        else:
            dp1[i][j]=dp1[i-1][j]

for i in range(1,n+1):
    for j in range(t):
        if j-arev[i-1]>=0:
            dp2[i][j]=max(dp2[i-1][j-arev[i-1]]+brev[i-1],dp2[i-1][j])
        else:
            dp2[i][j]=dp2[i-1][j]

ans=-1
for i in range(1,n+1):
    for j in range(t):
        ans=max(ans,dp1[i-1][j]+dp2[n-i][t-1-j]+b[i-1])
print(ans)
def main(int_list):
  sorted_list = sorted(int_list)
  print ???str(sorted_list[0]) + ' ' + str(sorted_list[1]) + ' ' + str(sorted_list[2]) + ' ' ???

int_list = []
input_string = raw_input()
input_list = raw_input().split(' ')
for i in input_list:
  int_list.append(int(i))

main(int_list)

### FIXED CODE ###

a, b, c = sorted(map(int, raw_input().split()))
print a, b, c
# coding:utf-8
 
N = int(input())
H = [int(hi) for hi in input().split()]
 
# 地点iへの最小コストを計算する関数
def dp(i):
    if i == 0:
        return 0
    elif i == 1:
        return abs(H[0]-H[1])
    else:
        return min(dp(i-2)+abs(H[i-2]-H[i]), dp(i-1)+abs(H[i-1]-H[i]))
 
min_cost = dp(N-1)
print(min_cost)



### FIXED CODE ###

# coding:utf-8

N = int(input())
H = [int(hi) for hi in input().split()]
dp = [0]*N
dp[1] = abs(H[0]-H[1])

for i in range(2, N):
    dp[i] = min(abs(H[i]-H[i-2])+dp[i-2],abs(H[i]-H[i-1])+dp[i-1])
    
print(dp[N-1])
N,M = (int(x) for x in input().split())
a = N(N-1)/2
b = M(M-1)/2
c = N(N-1) + M(M-1)
print(a + b + c)

### FIXED CODE ###

N,M=map(int,input().split())
Ans = (N**2-N)/2 + (M**2-M)/2
print(int(Ans))
def pyn():
	n = int(input())
	a = list(map(int, input().split()))
    if 0 in a:
      print(0)
      return
    
	ans=1
	for i in a:
 	 	ans *= i
		if ans>10**18:
  			print(-1)
            return
	print(ans)


### FIXED CODE ###

def pyn():
  n = int(input())
  a = list(map(int, input().split()))
  if 0 in a:
    print(0)
    return
    
  ans=1
  for i in a:
    ans *= i
    if ans>10**18:
      print(-1)
      return
  print(ans)

pyn()
a = [int(i) for i in input().split()]
if a[0]*a[1] > a[2]:
  return c
else:
  return a[0]*a[1]

### FIXED CODE ###

n, a, b = (int(i) for i in input().split())
if n*a > b:
  print(b)
else:
  print(n*a)
from collections import Counter
n,m=map(int, input().split())
ans=1
l=[]
x=[-1]*n
for i in range(m):
    a,b=map(int, input().split())
    a-=1
    b-=1
    if x[a]+x[b]==-2:
        l.append(2)
        x[a]=len(l)-1
        x[b]=len(l)-1
    elif x[a]==x[b]:
        continue
    elif x[a]!=-1:
        l[x[b]]+=1
        x[a]=x[b]
    elif x[b]!=-1:
        l[x[a]]+=1
        x[b]=x[a]
    else:
        l[x[a]]+=l[x[b]]
        l[x[b]]=0
        for i in range(n):
            if x[i]==x[b]:
                x[i]=x[a]
print(max(l))

### FIXED CODE ###

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

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

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

n,m=map(int, input().split())
uf=UnionFind(n)
for _ in range(m):
    a,b=map(int, input().split())
    uf.union(a-1, b-1)
cnt=0
for i in range(n):
    cnt=max(cnt, uf.size(i))
print(cnt)
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
a, b, c = map(int, input().split())
print("{}".c-(a-b))

### FIXED CODE ###

# -*- coding: utf-8 -*-
a, b, c = map(int, input().split())
# 文字列の入力
# 出力
print("{}".format(c-(a-b) if (c-(a-b)) > 0 else 0))
#!/usr/bin/env python
# -*- coding: utf-8 -*-

s = list(map(int,input().split()))
N = s[0]
X = s[1]

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

counter = 0
coordinate = 0
i = 0
while(coordinate <= X and counter < N+1):
    counter += 1
    coordinate += L[i]
    i += 1

print(counter)


### FIXED CODE ###

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

s = list(map(int,input().split()))
N = s[0]
X = s[1]

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

counter = 1
coordinate = 0


for i in range(N):
    coordinate += L[i] #次に跳ねる座標
    if coordinate > X:
         break
    counter += 1


print(counter)
N = int(input())
a = []
for i in range(N):
    a.append(int(input()))
for i in range(3):
    m = max(a)
    a.remove(m)
    print (m)


### FIXED CODE ###

import sys
e = [int(i) for i in sys.stdin.readlines()]
for i in range(3):
    m = max(e)
    e.remove(m)
    print (m)
mod=N%K
if(mod !=0):
	print(1)
else:
  print(0)

### FIXED CODE ###

N, K = map(int, input().split())
mod=N%K

if(mod !=0):
    print(1)
else:
    print(0)
n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(1,n+1):
  if l[i-1]>l[i]:
     m.append(l[i-1]-l[i])
      l[i] = l[i-1]

print(sum(m))
  


### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
m = []
for i in range(n-1):
  if l[i]>l[i+1]:
     m.append(l[i]-l[i+1])
     l[i+1] = l[i]

print(sum(m))
S=int(input())
a = [0]*(S+1)
a[3]=1
for i in range(4, S+1):
  a[i] = a[i-3] + a[i-1]
mod=10**9+7
print(a[S]%mod)

### FIXED CODE ###

S=int(input())
a = [0]*(2000+1)
a[3]=1
for i in range(4, S+1):
  a[i] = a[i-3] + a[i-1]
mod=10**9+7
print(a[S]%mod)
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))
n = int(input())
s = list(map(int, [input() for i in range(n)]))
l = [
  [0, 0, 0]
  , [0, 0, 0]
  , [0, 0, 0]
]
for i in range(0, 3):
  for j in range(0, n):
    if a1[i] == s[j]:
      l[0][i] = i+1
for i in range(0, 3):
  for j in range(0, n):
    if a2[i] == s[j]:
      l[1][i] = i+1
for i in range(0, 3):
  for j in range(0, n):
    if a3[i] == s[j]:
      l[2][i] = i+1
for i in l:
  for j in i:
    if j != 0:
      n.append(j)
count = 0
for i in range(0, 3):
  if l[i][0] and l[i][1] and l[i][2]:
    count += 1
if (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):
  count += 1
else:
  for i in range(1, 4):
    if n.count(i) == 3:
      count += 1
print('Yes' if count >= 1 else 'No')

### FIXED CODE ###

a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
a3 = list(map(int, input().split()))
n = int(input())
s = list(map(int, [input() for i in range(n)]))
l = [
  [0, 0, 0]
  , [0, 0, 0]
  , [0, 0, 0]
]
for i in range(0, 3):
  for j in range(0, n):
    if a1[i] == s[j]:
      l[0][i] = i+1
for i in range(0, 3):
  for j in range(0, n):
    if a2[i] == s[j]:
      l[1][i] = i+1
for i in range(0, 3):
  for j in range(0, n):
    if a3[i] == s[j]:
      l[2][i] = i+1
n = []
for i in l:
  for j in i:
    if j != 0:
      n.append(j)
count = 0
for i in range(0, 3):
  if l[i][0] and l[i][1] and l[i][2]:
    count += 1
if (l[0][0] and l[1][1] and l[2][2]) or (l[2][0] and l[1][1] and l[0][2]):
  count += 1
else:
  for i in range(1, 4):
    if n.count(i) == 3:
      count += 1
print('Yes' if count >= 1 else 'No')
S=[0]*100010
S[1]=1
S[2]=1
for i in range(3,102):
    S[i]=(S[i-2]+S[i-1])%1000000007

N,M=map(int,input().split())
T=[]
for i in range(M):
    T.append(int(input()))
    if i>=1:
        if T[i]-1==T[i-1]:
            print(0)
            exit()

U=[]
U.append(T[0])
for i in range(1,M):
    U.append(T[i]-T[i-1]-1)

U.append(N-T[M-1])

ans=1
for i in range(len(U)):
    ans=(ans*S[U[i]])%1000000007
print(ans)


### FIXED CODE ###

S=[0]*100010
S[1]=1
S[2]=1
for i in range(3,100010):
    S[i]=(S[i-2]+S[i-1])%1000000007

N,M=map(int,input().split())
if M==0:
    ans=1
    print(S[N+1])
    exit()
T=[]
for i in range(M):
    T.append(int(input()))
    if i>=1:
        if T[i]-1==T[i-1]:
            print(0)
            exit()

U=[]
U.append(T[0])
for i in range(1,M):
    U.append(T[i]-T[i-1]-1)

U.append(N-T[M-1])

ans=1
for i in range(len(U)):
    ans=(ans*S[U[i]])%1000000007
print(ans)
a, b, c, d = map(int, open[0])
print(min(a, b) + min(c, d))

### FIXED CODE ###

a, b, c, d = map(int, open(0))
print(min(a, b) + min(c, d))
a = int(input())
a1 = a%5
a2 = a + (5-a1)%5
b = int(input())
b1=b%5
b2 = b + (5-b1)%5
c = int(input())
c1=c%5
c2 = c + (5-c1)%5
d = int(input())
d1=d%5
d2 = d + (5-d1)%5
e = int(input())
e2 = e + (5-e1)%5
if min(a1,b1,c1,d1,e1) == 0:
    ans = sum(a2,b2,c2,d2,e2)
else:
    ans = sum(a2,b2,c2,d2,e2) -5 +min(a1,b1,c1,d1,e1)
print(ans)

### FIXED CODE ###

l = []
a = int(input())
a1 = a%10
a2 = a + (10-a1)%10
b = int(input())
b1=b%10
b2 = b + (10-b1)%10
c = int(input())
c1=c%10
c2 = c + (10-c1)%10
d = int(input())
d1=d%10
d2 = d + (10-d1)%10
e = int(input())
e1=e%10
e2 = e + (10-e1)%10
if a1 != 0:
    l.append(a1)
if b1 != 0:
    l.append(b1)
if c1 != 0:
    l.append(c1)
if d1 != 0:
    l.append(d1)
if e1 != 0:
    l.append(e1)

if max(a1,b1,c1,d1,e1) == 0:
    ans = a2+b2+c2+d2+e2
else:
    ans = a2+b2+c2+d2+e2 -10 +min(l)
print(ans)
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

N = int(input())

table = [0] * (N+5)

for i in range(1, N+2):
    for j in range(i, N+2, i):
        table[j] += 1
ans = 0
for i in range(N):
    ans += table[i]

print(ans)

### FIXED CODE ###

N = int(input())

table = [0] * (N+5)

for i in range(1, N+3):
    for j in range(i, N+2, i):
        table[j] += 1
ans = 0
for i in range(N):
    ans += table[i]

print(ans)
n,m=map(int,input().split())
# print
v=[]
for i in range(n+2):
    s=""
    if i==0 or i==n+1:
        s="#"*(m+2)
        
    else:
        a=input()
        s="#"+a+"#"
    v.append(s)
    
    
for i in v:
    print(i)
    

### FIXED CODE ###


n,m=map(int,input().split())
# print
# v=[]
for i in range(n+2):
    s=""
    if i==0 or i==n+1:
        s="#"*(m+2)
        
    else:
        a=input()
        s="#"+a+"#"
    print(s)
    # v.append(s)
    
    
# for i in v:
#     print(i)
def resolve():
    N = int(input())
    list = list(map(int, input().split()))
    no = 0
    non = 0
    ans = 1
    lens = 0
    if (list.count("0") >= 1):
      print("0")
      exit()
    else:
      for i in range(N):
        lens = lens + len(list[non])
        non += 1
    if (lens >= 19):
      print("-1")
      exit()
    else:
      for j in range(N):
        ans = ans * list[no]
        no += 1
        print(ans)
resolve()

### FIXED CODE ###

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 1
    if 0 in A:
        print(0)
        exit()
    for i in A:
        ans *= i
        if ans > 10**18:
            print(-1)
            exit()
    print(ans)
resolve()
a,b,h=map(int,input().split())
ans=(a+b)*h*0.5
print(ans)



### FIXED CODE ###

a=int(input())
b=int(input())
h=int(input())
ans=(a+b)*h*0.5
print(int(ans))
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    C=[]
    
    #連番無視
    for i in range(N):
        c=I()
        c-=1
        if C==[]:
            C.append(c)
        else:
            if C[-1]!=c:
                C.append(c)
    N=len(C)            
            
    """
    i番目の通り数をf(i)とする．
    今，i番目までを見てて，i番目と同じ数はj,kにあるとする．
    f(i)=
         f(i-1) #iを使わない
        +f(j-1) #i-jのみ
        +f(k-1) #i-kのみ
    かな，各色ごとに，f(j-1)+f(k-1)みたいなのをまとめておく
    """    
    S=[0]*N
    
    ans=1
    for i in range(N):
        c=C[i]
        temp=ans
        ans=(ans+S[c])%mod
        S[c]=(S[c]+temp)%mod
        
    print(ans)
        
        
        
        
    

main()


### FIXED CODE ###

import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N=I()
    C=[]
    
    #連番無視
    for i in range(N):
        c=I()
        c-=1
        if C==[]:
            C.append(c)
        else:
            if C[-1]!=c:
                C.append(c)         
            
    """
    i番目の通り数をf(i)とする．
    今，i番目までを見てて，i番目と同じ数はj,kにあるとする．
    f(i)=
         f(i-1) #iを使わない
        +f(j-1) #i-jのみ
        +f(k-1) #i-kのみ
    かな，各色ごとに，f(j-1)+f(k-1)みたいなのをまとめておく
    """    
    S=[0]*(2*10**5 + 5)
    
    ans=1
    for c in C:
        temp=ans
        ans=(ans+S[c])%mod
        S[c]=(S[c]+temp)%mod
        
    print(ans)
        
        
        
        
    

main()
N=int(input())
M=int(input())
if N==M:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

N, M = input().split()
if N == M:
  print("Yes")
else:
  print("No")
import fractions
from functools import reduce
N, X = map(int, input().split())
x = [int(input()) for i in range(N)]


x.insert(0,X)
x = sorted(x)

y = [0 for i in range(N)]

for i in range(N):
    y[i] = x[i+1]-x[i]

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

print(gcd(*y))

### FIXED CODE ###

import math
from functools import reduce
N, X = map(int, input().split())
x = list(map(int,input().split()))
 
for i in range(N):
    x[i] = abs(x[i]-X)
 
x = sorted(x)[::-1]
cnt = 0
 
for i in range(N):
    cnt = math.gcd(cnt, x[i])
 
print(cnt)
import math
import fractions
(a,b,c,d)=map(int,input().split())
g=int(c*d/math.gcd(c,d))
k=0
k+=int(b/c)+int(b/d)-int(b/g)-int((a-1)/c)-int((a-1)/d)+int((a-1)/g)

print(b-a+1-k)



### FIXED CODE ###

import math
import fractions
(a,b,c,d)=map(int,input().split())
g=c*d//fractions.gcd(c,d)
k=0
k+=b//c+b//d-b//g-int(a-1)//c-(a-1)//d+(a-1)//g

print(b-a+1-k)
#coding: UTF-8

word = input()
cnt = 0

while True:
    sentence = list(map(str, input().split()))
    for i in range(len(sentence)):
        if sentence[i] == 'END_OF_TEXT':
            break
        elif word == sentence[i]:
            cnt += 1
        else:
            pass

print(ctn)


### FIXED CODE ###

#coding: UTF-8

word = input().upper()
cnt = 0

while True:
    sentence = list(map(str, input().split()))
    if 'END_OF_TEXT' in sentence:
        break
    for i in range(len(sentence)):
        if word == sentence[i].upper():
            cnt += 1

print(cnt)
import math
N, W = map(int, input().split())

if N == 1 or W == 1:
  ans = 1
else
  ans = math.ceil((N * W) / 2)
  
print(ans)


### FIXED CODE ###

import math
N, W = map(int, input().split())

if N == 1 or W == 1:
  ans = 1
else:
  ans = math.ceil((N * W) / 2)
  
print(ans)
n = int(input())
sum = 1
Max = 1000000000000000000
while n:
  sum*=int(input())
  if sum>Max:
    break
  n-=1
if sum<=Max:
  print("%d" % sum)
else :
  print("%d" % -1)


### FIXED CODE ###

n = int(input())
Sum = 1
Max = 1000000000000000000

l = list(map(int, input().split()))
f = 0
for i in range(n):
  if l[i]==0:
    f = 1
for i in range(n):
  Sum=Sum*l[i]
  if Sum>Max:
     break
if f == 1:
  print("0")
elif Sum<=Max:
  print("%d" % Sum)
else :
  print("%d" % -1)
s_dash = input()
t = input()
n = len(s)
m = len(t)

for i in range(n - m + 1):
    flag = True
    for j in range(m):
      if s_dash[i+j] != "?" and s_dash[i+j] != t[j]:
        flag = False
        break
    if flag:
      ans = list(s_dash)
      ans[i:i+m] = list(t)
      ans = "".join(ans).replace("?", "a")
      print(ans)
      exit()
      
print("UNRESTORABLE")
      

### FIXED CODE ###

S = input()
T = input()
if len(S) < len(T):
    print("UNRESTORABLE")
    exit()
for i in range(len(S) - len(T), -1, -1):
    for s, t in zip(S[i:i+len(T)], T):
        if s != "?" and s != t:
            break
    else:
        S = list(S)
        S[i:i+len(T)] = list(T)
        S = "".join(S).replace("?", "a")
        print(S)
        exit()
print("UNRESTORABLE")