Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())

a = [int(input()) for i in range(M)]
dp = [0 for i in range(N + 1)]
flag = [False for i in range(N + 1)]
dp[0] = 1
if a[0] != 1:
    dp[1] = 1
for i in a:
    flag[i] = True
for i in range(2,N+1):
    if flag[i - 1] != True:
        dp[i] = dp[i - 1]
    if flag[i - 2] != True:
        dp[i] += dp[i - 2]
print(dp[N] % 1000000007 )

### FIXED CODE ###

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

bs = [True for i in range(N+1)]
for i in range(M):
    a = int(input())
    bs[a] = False

dp = [0 for i in range(N+1)]
dp[0] = 1
if bs[1] != False: dp[1] = 1

for i in range(2,N+1):
    if bs[i-1] != False:
        dp[i] += dp[i - 1]
    if bs[i - 2] != False:
        dp[i] += dp[i - 2]

print(dp[N] % 1000000007)
N = int(input())
N &= 10
if N in [2,4,5,7,9]:
	print('hon')
elif N in [0,1,6,8]:
	print('pon')
else N == 3
	print('bon')

### FIXED CODE ###

N = int(input())
a = N%10
if a in [2,4,5,7,9]:
	print('hon')
elif a in [0,1,6,8]:
	print('pon')
elif a == 3:
	print('bon')
while True:
    x=raw_input()
    if x=='':
        break
    L=x.split(" ")
    sum = int(L[0])+int(L[1])
    digit = 1
    while sum>=10:
        sum = sum/10
        digit = digit + 1

    print digit

### FIXED CODE ###

import sys
for jk in sys.stdin:
    L=jk.split(" ")
    sum = int(L[0])+int(L[1])
    digit = 1
    while sum>=10:
        sum = sum/10
        digit = digit + 1

    print digit
A, B, C, K = map(int, input().split())

if A >= K:
    print(A)
elif A+B >=K:
    print(A)
else A+B+C >=K:
    nc = K - A - B
    print(A - nc)



### FIXED CODE ###

A, B, C, K = map(int, input().split())

score = 0
if A < K:
    K -=A
    score += A
else:
    score = K
    print(score)
    exit()

if B < K:
    K -=B
else:
    print(score)
    exit()

if C < K:
    K -=C
    score -= C
else:
    score -= K
    print(score)
    exit()
print(score)
n=int(input())
li=[]
for i in range(n):
    s=list(input())
    s.sorted()
    li.append(s)
li.sorted()

ans=0
f=1
for i in range(n-1):
    if li[i]==li[i+1]:
        f+=1
    else:
        ans+=f*(f-1)//2
        f=1
print(ans+f*(f-1)//2)

### FIXED CODE ###

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

ans=0
f=1
for i in range(n-1):
    if li[i]==li[i+1]:
        f+=1
    else:
        ans+=f*(f-1)//2
        f=1
print(ans+f*(f-1)//2)
N,K = [int(s) for s in inpput().split()]
heights = [int(s) for s in input().split()]

count = 0

for i in range(N):
  if heights[i] >= K:
    count+=1
    
print(count)

### FIXED CODE ###

N,K = [int(s) for s in input().split()]
heights = [int(s) for s in input().split()]
 
count = 0
 
for i in range(N):
  if heights[i] >= K:
    count+=1
    
print(count)
import sys
l = raw_input().split()
N = int(l[0])
M = int(l[1])
nlist = []
list1 = []
flag = True
for i in range(0, M):
    tmp = raw_input().split()
    a = int(tmp[0])
    b = int(tmp[1])
    if a == 1:
        list1.append(b)
        continue
    if b == N:
        nlist.append(a)
        continue
matched_list = list(set(list1) & set(nlist))
if len(matched_list) == 0:
    print('IMPOSSIBLE')
else:
    print('POSSIBLE')

### FIXED CODE ###

N = raw_input()
print('ABC{0}'.format(N))
ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
gcd = math.gcd
a,b = ma()
print(a*b//gcd(a,b))


### FIXED CODE ###

ma = lambda :map(int,input().split())
ni = lambda:int(input())
import collections
import math
import itertools
import fractions
gcd = fractions.gcd
a,b = ma()
print(a*b//gcd(a,b))
n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[1]-1,n[0]):
    if(m[i]<m[i+1]):
        print("Yes")
    else:
        print("No")

### FIXED CODE ###

n=list(map(int,input().strip().split()))
m=list(map(int,input().strip().split()))
for i in range(n[0]-n[1]):
    if(m[i+n[1]]>m[i]):
        print("Yes")
    else:
        print("No")
def dp(i, h, c):
    if i == len(h)-1:
        return c
    elif i == len(h)-2:
        return dp(i+1, h, c + abs(h[i] - h[i+1]))
    return min(dp(i+1, h, c + abs(h[i] - h[i+1])), dp(i+2, h, c + abs(h[i] - h[i+2])))

if __name__ == '__main__':
    n = int(input())
    h = list(map(int, input().split()))
    c = 0

    print(dp(0, h, c))


### FIXED CODE ###

if __name__ == '__main__':
    n = int(input())
    h = list(map(int, input().split()))
    c = [0] * n
    c[1] = abs(h[1] - h[0])

    for i in range(2, n):
        c[i] = min(c[i-1] + abs(h[i] - h[i-1]), c[i-2] + abs(h[i] - h[i-2]))

    print(c.pop())
import numpy as np
    
n = int(input())
S = np.asarray([])
St = np.zeros(4) # None,B,A,BA
count = 0

for i in range(n):
    S=np.append(S,input())
    tmp = 0
    count += S[i].count("AB")
    if S[i][0] == "B":
        tmp += 1
    if S[i][-1] == "A":
        tmp += 2
    St[tmp]+=1

if (St[1] == 0)&(St[3]>0):
    St[1]+=1
    St[3]-=1

if (St[2] == 0)&(St[3]>0):
    St[2]+=1
    St[3]-=1

print(int(count+min(St[1],St[2])+St[3]))

### FIXED CODE ###

import numpy as np

n,k=list(map(int,input().split()))
print(n-k+1)
import sys
import itertools
import numpy as np
MOD = 3
INF = 1000000000


def input():
    return sys.stdin.readline().rstrip()


def main():
    n, c = [int(e) for e in input().split()]
    dMat = [[int(e) for e in input().split()] for _ in range(c)]
    cMat = [[int(e) for e in input().split()] for _ in range(n)]

    cost = [[0 for _ in range(c)] for _ in range(MOD)]
    for hi in range(n):
        for wi in range(n):
            cMod = ((hi + 1) + (wi + 1)) % MOD
            for ci in range(c):
                cost[cMod][ci] += dMat[cMat[hi][wi] - 1][ci]

    ans = INF
    for perm in itertools.permutations(range(c), MOD):
        costSum = 0
        for di in range(MOD):
            costSum += cost[di][perm[di]]
        ans = min(ans, costSum)
    print(ans)


main()


### FIXED CODE ###

import sys
import itertools
import numpy as np
MOD = 3
INF = 1000000000


def input():
    return sys.stdin.readline().rstrip()


def main():
    n, c = [int(e) for e in input().split()]
    dMat = [[int(e) for e in input().split()] for _ in range(c)]
    cMat = [[int(e) for e in input().split()] for _ in range(n)]

    cost = [[0 for _ in range(c)] for _ in range(MOD)]
    for hi in range(n):
        for wi in range(n):
            cMod = ((hi + 1) + (wi + 1)) % MOD
            for ci in range(c):
                cost[cMod][ci] += dMat[cMat[hi][wi] - 1][ci]

    ans = INF
    for perm in itertools.permutations(range(c), MOD):
        costSum = 0
        for di in range(MOD):
            costSum += cost[di][perm[di]]
        ans = min(ans, costSum)
    print(ans)


main()
a,b = int(input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

### FIXED CODE ###

a,b = map(int, input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')
a, b = map(int, input().split())
def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a
n = gcd(a, b)
def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
l = primes(n)
count = 1
for p in l:
    if a % p == 0 and b % p == 0:
        count += 1
print(count)

### FIXED CODE ###

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

def gcd(a, b):
    while b > 0:
        a, b = b, a%b
    return a
n = gcd(a, b)

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

ans = set(prime_factorize(n))
print(len(ans)+1)
A,B = map(int,input().split())

print(A*B

### FIXED CODE ###

A,B = map(int,input().split())

print(A*B)
import sys
I = sys.stdin.readline
pr = sys.stdout.write
 
def main():
	n=int(I())
	ar=list(map(int,I().split()))
 
	def solve(x):
		if x>=n-2:return abs(ar[n-1]-ar[x])
		return min(abs(ar[x]-ar[x+1])+solve(x+1) , abs(ar[x]-ar[x+2])+solve(x+2))
 
	pr(str(solve(0)))
 
if __name__ == '__main__':main()

### FIXED CODE ###

import sys
I = lambda:map(int,sys.stdin.readline().split())
pr = lambda x:sys.stdout.write(f'{x}\n')
sys.setrecursionlimit(2000000001)

mn = lambda w,x,y,z: min(abs(w)+x,abs(y)+z)
n = ar = dp = 0

def solve(x):
	global n,ar,dp
	if x>=n-2: return dp[x]
	if dp[x] != -1: return dp[x]
	dp[x] = mn(ar[x]-ar[x+1], solve(x+1), ar[x]-ar[x+2], solve(x+2))
	# pr(f'{x} => {dp[x]}')
	return dp[x]

def main():
	global n,ar,dp
	n, ar = *I(), [*I()]
	dp = [-1]*(n-2) + [abs(ar[-2]-ar[-1]),0]
	# pr((n,ar,dp))
	pr(solve(0))

main()
a = input()
s = input()

if a =>3200:
  print(s)
else:
  print(red)

### FIXED CODE ###

a = input()
s = input()
 
if int(a) >= int(3200):
  print(s)
else:
  print('red')
n,h,w=map(int,input().split())
cnt=0
for i in range(n):
  a,b=map(int,input().split)
  if h<=a and w<=b:
    cnt+=1
print(cnt)

### FIXED CODE ###

n,h,w=map(int,input().split())
cnt=0
for i in range(n):
  a,b=map(int,input().split())
  if h<=a and w<=b:
    cnt+=1
print(cnt)
import math
A,B,H,M=map(int,input().split())
thetaA=(360*H/12)%360
thetaB=(360*M/60)%360
if theraA-thetaB<=180:
  theta=theraA-thetaB
else:
  theta=360-theraA-thetaB
print(A*B*math.cos(math.radians(theta)))


### FIXED CODE ###

import math
A,B,H,M=map(int,input().split())
thetaA=360/12*H+360/12*M/60
thetaB=360/60*M
theta=thetaA-thetaB
print(math.sqrt(A*A+B*B-2*A*B*math.cos(math.radians(theta))))
d,t,s = map(double, input().split())  
time = d/s
if time > t:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

d,t,s = map(int, input().split())  
time = d/s
if time <= t:
    print("Yes")
else:
    print("No")
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    ans = "Yes"
    break
  else:
    ans = "No"
print(ans)

### FIXED CODE ###

a,b=map(int,input().split())
c=int(str(a)+str(b))
for i in range(int(c**(1/2))+1) :
  if i**2==c :
    print("Yes")
    exit()
print("No")
import math

N = int(input())
S = [sorted(input()) for i in range(N)]
S = ["".join(S[i]) for i in range(N)]

S.sort()
S_ = S[:]
S_ = set(S_)

c = 0

for i in S_:
    a = S.count(i)
    if a == 1 :
        continue
    ans = math.factorial(a) / 2 * math.factorial(a-2)
    c += int(ans)

print(c)


### FIXED CODE ###

n = int(input())
s = [input() for i in range(n)]
existed = {}
c = 0
for i in range(n):
  sorted_s = ''.join(sorted(s[i]))

  if sorted_s in existed:
    c += existed[sorted_s]
    existed[sorted_s] += 1
  else:
    existed[sorted_s] = 1
print(c)
import sys

input = sys.stdin.read()
(a,b) = [int(x) for x in input.split(" ")]

x = a*b
y = 2*(a+b)

print x + "?\t" + y

### FIXED CODE ###

import sys

lst = sys.stdin.read().split(" ")

a = int(lst[0])
b = int(lst[1])

print str(a*b) + " " + str(2*(a+b))
import sys
input = sys.stdin.readline

class Unionfind:

    __slots__ = ['nodes','size']

    def __init__(self, n):
        self.nodes = list(range(n))
        self.size = [1]*n

    def root(self, x):
        if self.nodes[x] == x:
            return x
        else:
            root_x = self.root(self.nodes[x])
            self.nodes[x] = root_x
            return root_x

    def unite(self, x, y):
        x = self.root(x); y = self.root(y)
        if x == y:
            return
        if self.size[x] < self.size[y]:
            x, y = y, x
        self.size[x] += self.size[y]
        self.nodes[y] = x

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

N,K,L = map(int,input().split())
road = [[int(e)-1 for e in input().split()] for _ in range(K)]
rail = [[int(e)-1 for e in input().split()] for _ in range(L)]

uf1 = Unionfind(N)
uf2 = Unionfind(N)

for p,q in road:
    uf1.unite(p,q)

for r,s in rail:
    uf2.unite(r,s)

set1 = [0]*N
set2 = [0]*N

for node in range(N):
    if node == uf1.root(node):
        set1[node] = set()
    set1[node] = set1[uf1.root(node)]
    set1[node].add(node)
    if node == uf2.root(node):
        set2[node] = set()
    set2[node] = set2[uf2.root(node)]
    set2[node].add(node)

ans = []

for node in range(N):
    ans.append(str(len(set1[node] & set2[node])))

print(" ".join(ans))

### FIXED CODE ###

import sys
input = sys.stdin.readline

class Unionfind:

    __slots__ = ['nodes','size']

    def __init__(self, n):
        self.nodes = list(range(n))
        self.size = [1]*n

    def root(self, x):
        if self.nodes[x] == x:
            return x
        else:
            root_x = self.root(self.nodes[x])
            self.nodes[x] = root_x
            return root_x

    def unite(self, x, y):
        x = self.root(x); y = self.root(y)
        if x == y:
            return
        if self.size[x] < self.size[y]:
            x, y = y, x
        self.size[x] += self.size[y]
        self.nodes[y] = x

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

N,K,L = map(int,input().split())

uf1 = Unionfind(N)
uf2 = Unionfind(N)

for _ in range(K):
    p,q = map(int,input().split())
    p -= 1; q -= 1
    uf1.unite(p,q)

for _ in range(L):
    r,s = map(int,input().split())
    r -= 1; s -= 1
    uf2.unite(r,s)

keys = []
dic = {}

for node in range(N):
    key = (uf1.root(node),uf2.root(node))
    keys.append(key)
    if key in dic:
        dic[key] += 1
    else:
        dic[key] = 1

ans = [str(dic[key]) for key in keys]
print(" ".join(ans))
A = [257, 2, 3, 131, 5, 7, 137, 11, 139, 13, 17, 19, 149, 23, 151, 29, 157, 31, 163, 37, 167, 41, 43, 173, 47, 179, 53, 181, 59, 61, 191, 193, 67, 197, 71, 199, 73, 79, 83, 211, 89, 223, 97, 227, 101, 229, 103, 233, 107, 109, 239, 113, 241, 251, 127]

N = int(input())

ans = ""
for i in range(N):
  ans += " " + A[i]
  
print(ans[1:])

### FIXED CODE ###

N = int(input())

Prime = [2, ]
ans = []
i = 3

while(len(ans) < N):
    Pflag = True
    for p in Prime:
        if(i % p == 0):
            Pflag = False
            break

    if(Pflag is True):
        Prime.append(i)
        if(i % 5 == 1):
            ans.append(i)

    i += 2

S = ""
for p in ans:
    S += " " + str(p)

print(S[1:])
x,y,z = map(int,input().split())
if c − a − b > 0 and 4 * a * b < (c − a − b)**2:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

a, b, c = map(int,input().split())
if (c - a - b > 0) and (4 * a * b < (c - a - b)**2):
  print('Yes')
else:
  print('No')
sentence = raw_input().strip()
ans = []

for i in range(26):
  ans.append(0)

for string in sentence:
  string = string.lower()
  key = ord(string) - ord('a')
  if 0 <= key <= 25:
    ans[key] += 1

for i in range(len(ans)):
  print('{} : {}".format(chr(ord('a') + i), ans) 

### FIXED CODE ###

import sys
 
text = sys.stdin.readlines()
ans = []
for i in range(26):
    ans.append(0)
for i in text:
    i = i.strip()
    for j in i:
        j = j.lower()
        key = ord(j) - ord("a")
        if 0 <= key <= 25:
            ans[key] += 1
for i in range(len(ans)):
    print "{} : {}".format(chr(ord("a") + i), ans[i])
a,b=map(int,input().split())
print(max(a=b,a-b,a*b))

### FIXED CODE ###

a,b=map(int,input().split())
print(max(a+b,a-b,a*b))
x = input()
a = []
check = []
for i in range(int(x)):
    a.append(int(input()) - 1)
    check.append(1)

index = 0



while True:
    check[index] = 0
    index = a[index]
    if check[index] == 0:
        print(-1)
        break
    if index == 1:
        print(count)
        break

### FIXED CODE ###

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

if (b <= a):
    print("delicious")
elif (b <= a+x):
    print("safe")
else:
    print("dangerous")
# coding: utf-8
M, N = list(map(int, input().split()))
q = int(input())

Map = []
for i in range(M):
    Map.append(input)

def get_slide_sum(Map, kw):
    l = []
    for r in range(M):
        tmp = []
        for c in range(N):
            ll = 0 if c == 0 else tmp[c-1]
            ul = 0 if r == 0 or c == 0 else l[r-1][c-1]
            ur = 0 if r == 0 else l[r-1][c]
            count = ll + ur - ul
            if Map[r][c] == kw:
                count+=1
            tmp.append(count)
        l.append(tmp)
    return l

J = get_slide_sum(Map, 'J')
O = get_slide_sum(Map, 'O')
I = get_slide_sum(Map, 'I')

def get_sum(inp,L):
    a, b, c, d = list(map(int, inp.split()))
    ll = 0 if a == 1 else L[a-2][d-1]
    ul = 0 if a == 1 or b == 1 else L[a-2][b-2]
    ur = 0 if b == 1 else L[c-1][b-2]
    return L[c-1][d-1] - ll - ur + ul

for i in range(q):
    inp = input()
    print(get_sum(inp, J), get_sum(inp, O), get_sum(inp, I))

### FIXED CODE ###

# coding: utf-8
M, N = list(map(int, input().split()))
q = int(input())

Map = []
for i in range(M):
    Map.append(input())

def get_slide_sum(Map, kw):
    l = []
    for r in range(M):
        tmp = []
        for c in range(N):
            ll = 0 if c == 0 else tmp[c-1]
            ul = 0 if r == 0 or c == 0 else l[r-1][c-1]
            ur = 0 if r == 0 else l[r-1][c]
            count = ll + ur - ul
            if Map[r][c] == kw:
                count+=1
            tmp.append(count)
        l.append(tmp)
    return l

J = get_slide_sum(Map, 'J')
O = get_slide_sum(Map, 'O')
I = get_slide_sum(Map, 'I')

def get_sum(inp,L):
    a, b, c, d = list(map(int, inp.split()))
    ll = 0 if a == 1 else L[a-2][d-1]
    ul = 0 if a == 1 or b == 1 else L[a-2][b-2]
    ur = 0 if b == 1 else L[c-1][b-2]
    return L[c-1][d-1] - ll - ur + ul

for i in range(q):
    inp = input()
    print(get_sum(inp, J), get_sum(inp, O), get_sum(inp, I))
A = input()
if A == 'A'
  print('T')
elif A == 'T'
  print('A')
elif A == 'C'
  print('G')
elif A == 'G'
  print('C')

### FIXED CODE ###

A = input()
if A == 'A':
  print('T')
elif A == 'T':
  print('A')
elif A == 'C':
  print('G')
elif A == 'G':
  print('C')
ss = sorted(list(set(s)))
lens = len(ss)
l = [0]*len(ss)
for i in range(lens):
    l[i] =s.count(ss[i])
for i in range(lens):
    if l[i] == max(l):
        print(ss[i])

### FIXED CODE ###

N = int(input())

d = {}
for _ in range(N):
    S = input()
    if S in d:
        d[S] += 1
    else:
        d[S] = 1

m = max(d.values())
for s in sorted(k for k in d if d[k] == m):
    print(s)
import math
A, B, C, D = map(int, input().split())

num = (C*D)//(math.gcd(C, D))
if(A%C==0):
    num1 = A//C-1
else:
    num1 = A//C
if(A%D==0):
    num2 = A//D-1
else:
    num2 = A//D
if(A%num == 0):
    num3 = A//num-1
else:
    num3 = A//num
print(int(B-A+1-((B//C-num1)+(B//D-num2)-(B//num-num3))))

### FIXED CODE ###

import fractions
A, B, C, D = map(int, input().split())

num = (C*D)//(fractions.gcd(C, D))
if(A%C==0):
    num1 = A//C-1
else:
    num1 = A//C
if(A%D==0):
    num2 = A//D-1
else:
    num2 = A//D
if(A%num == 0):
    num3 = A//num-1
else:
    num3 = A//num
print(int(B-A+1-((B//C-num1)+(B//D-num2)-(B//num-num3))))
n, a, b = map(int, input().split()))
print(sum(i for i in range(1 + n+1) if a <= sum(map(int, str(i)) <=b)))

### FIXED CODE ###

n,a,b = map(int, input().split())
print(sum(i for i in range(1, n+1) if a <= sum(map(int, str(i))) <= b))
a, b, c = map(int, input().split())
print(min(min(a+b,b+c),a+c)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(min(min(a+b,b+c),a+c))
x=input()
int(x)
print(x*x*x)

### FIXED CODE ###

a=input()
a=int(a)
a=a**3
print (a)
a = map(int.input().split())
if a[0]=a[-1]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a=input()
if a[0]==a[2]:
  print("Yes")
else:
  print("No")
import math
from functools import reduce
N = int(input())
A = input().split()
A = [int(a) for a in A]
B = []
for n in range(N):
  for i in range(1:(10^9)+1):
    A[n] = i
    b = reduce(math.gcd, A)
    B.append(b)
B_max = max(b)
print(B_max)

### FIXED CODE ###

# PDF解説
N = int(input())
A = [int(a) for a in input().split()]

import fractions

L = []
# [gcd(0), gcd(0, A[0]), ... , gcd(0, A[0], A[1], ..., A[N-2])]
R = []
# [gcd(A[1], A[2], ... , A[N-1], 0), gcd(A[2], A[3], ... , A[N-1], 0), ... , gcd(0)]

L.append(0)
for i in range(0, N-1, 1):
  l = fractions.gcd(L[-1], A[i])
  L.append(l)

R.append(0)
for j in range(N-1, 0, -1):
  r = fractions.gcd(R[-1], A[j])
  R.append(r)
R.reverse()

ans = 0
for n in range(N):
  lr = fractions.gcd(L[n], R[n])
  ans = max(ans, lr)

print(ans)
N = int(input())
S = list(str(input()))
countlist=[]
anslist =[]
if N % 2 == 0:
    split = N / 2
    odd = False
else:
    split = N / 2 + 1
    odd = True
for i in range(1,N-1):
    if i > split:
        check = 0
    else:
        check = 1
    s1 = list(set(S[0:i]))
    s2 = list(set(S[i:]))
   # print(s1)
   # print(s2)
    if check == 0:
        for j in s2:
            if j not in s1:
                s2.remove(j)
    else:
        for j in s1:
            if j not in s2:
                s1.remove(j)
    if(check == 0):
        countlist.append(len(s2))
    else:
        countlist.append(len(s1))

ans = sorted(countlist,reverse=True)


print(ans[0])

### FIXED CODE ###

N = int(input())
S = list(str(input()))
countlist=[]
for i in range(0,N):
    s1 = set(S[:i])
    s2 = set(S[i:])

    matched_list=list(s1 & s2)
    countlist.append(len(matched_list))

ans = max(countlist)
print(ans)
# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

count = [0 for _ in range(n)]
for i in reversed(range(1, n + 1)):
    tmp = 0
    for j in range(i, n):
        if j % 1 == 0:
            tmp += a[j]
    if a[i-1] % 2 != tmp % 2:
        count[i] += 1
m = count.count(1)
ans = []
for i in range(n):
    if count[i] == 1:
        ans.append(str(i))

print(m)
print(' '.join(ans))


### FIXED CODE ###

# -*- coding: utf-8 -*-
n = int(input())
a = [int(i) for i in input().split()]

count = [0 for _ in range(n)]
for i in reversed(range(1, n + 1)):
    tmp = 0
    for j in range(i, n+1, i):
        tmp += count[j-1]
    #print(tmp)
    if a[i-1] % 2 != tmp % 2:
        count[i-1] += 1
#print(count)
m = sum(count)
ans = []
for i in range(n):
    if count[i] == 1:
        ans.append(str(i+1))

print(m)
print(' '.join(ans))
import numpy as np

def resolve():
  N, M = map(int, input().split(" "))
  rooms = [None] * N

  def search_and_mark(recent_rooms, ab, depth):
    # if None not in rooms:
    if len(ab) == 0:
      return rooms

    if depth >= N:
      return []

    tmp_rooms = []
    for r in recent_rooms:
      tmp = ab[np.any(ab == r, axis=1)]
      target = tmp[tmp != r]
      tmp_rooms.extend(target)

      tmp = np.all(ab != r, axis=1)
      ab = ab[tmp]
      
      for t in target:
        if rooms[t] == None:
          rooms[t] = r

    recent_rooms = list(set(tmp_rooms))
    return search_and_mark(recent_rooms, ab, depth+1)

  AB = []
  for m in range(M):
    AB.append([int(x) - 1 for x in input().split(" ")])

  AB = np.array(AB)
  result = search_and_mark([0], AB, 0)

  print("Yes")
  for r in result[1:]:
    print(r + 1)

if __name__ == "__main__":
    resolve()

### FIXED CODE ###

def resolve():
  N, M = map(int, input().split(" "))
  AB_map = [[] for i in range(N)]
  for m in range(M):
    AB = [int(x) - 1 for x in input().split(" ")]
    AB_map[AB[0]].append(AB[1])
    AB_map[AB[1]].append(AB[0])

  not_finished = set(range(1, N+1))
  rooms = [None] * N
  rooms[0] = 0
  room_depths = [0] * N

  recent_rooms = [0]
  depth = 1
  while len(not_finished) != 0 and depth < N:
    temp_recent = set()
    for r in recent_rooms:
      for target in AB_map[r]:
        if target in not_finished:
          temp_recent.add(target)
          not_finished.remove(target)
          rooms[target] = r
          room_depths[target] = depth
    depth += 1
    recent_rooms = list(temp_recent)

  print("Yes")
  for r in rooms[1:]:
    print(r + 1)

if __name__ == "__main__":
    resolve()
N = int(input())
M = [x*y for y in range(1,10) for x in range(1,10)]

if N in M:
    print('Yes')     
else:
    print('No')  

### FIXED CODE ###

A,B = map(int,input().split())

if A >= 10 or B >= 10:
    print(-1)
else:
    print(A*B)
3 2
2 1

### FIXED CODE ###

H, W = map(int, input().strip().split())
h, w = map(int, input().strip().split())

res = (H - h) * (W - w)
print(res)