Harryxun/stf_run huggingface dataset:
_N, _M = [int(_) for _ in input().split()]


def calc(N, M):
    ans = 0

    hasikko = [0]
    if M > 1:
        hasikko.aapned(M - 1)

    for i in hasikko:
        tmp = 1
        if M > i + 1:
            tmp += 1
        if N > 1:
            tmp += 1
        if N > 1 and M > i + 1:
            tmp += 1
        if N > 1 and i - 1 >= 0:
            tmp += 1
        if i > 0:
            tmp += 1

        ans += tmp % 2
        # print(tmp, ans)
    if M > 2 and N == 1:
        ans += M - 2

    if N >= 2:
        ans = ans * 2
    return ans


res = calc(_N, _M)

if _N >= 3:
    res += calc(_M, _N - 2)

if _N >= 3 and _M >= 3:
    res += (_N - 2) * (_M - 2)
print(res)

### FIXED CODE ###

_N, _M = [int(_) for _ in input().split()]


def calc(N, M):
    ans = 0

    def hashicco(n, m):
        tmp = 1
        if n > 1:
            tmp += 1
        if m > 1:
            tmp += 1
            if n > 1:
                tmp += 1
        res = tmp % 2
        if n > 1:
            res *= 2
        if n > 1:
            res *= 2
        return res

    # ans += hashicco(N, M)

    v = 0
    if M > 2 and N == 1:
        v += M - 2
    h = 0
    if N > 2 and M == 1:
        h += N - 2

    return hashicco(N,M)+v+h


res = calc(_N, _M)

if _N >= 3 and _M >= 3:
    res += (_N - 2) * (_M - 2)
print(res)
S = input()
K = int(input())

i = 0
while S[i] == '1' and i < len(S):
    i += 1
if K < i:
    print(1)
else:
    print(S[i])


### FIXED CODE ###

S = input()
K = int(input())

i = 0
while i < len(S) and S[i] == '1':
    i += 1
if K <= i or i == len(S):
    print(1)
else:
    print(S[i])
n,d= map(int, input().split())
x,y=[int(input()) for i in range(n)]
s=0
def distance_count():
  
  for i in range(N)
  if (x[i]**2 + y[i]**2)**(1/2)<= D :
          s=s+1
   return s
answer = distance_count(x,y)
print(answer)

### FIXED CODE ###

N,D = map(int, input().split())
XY = [map(int, input().split()) for _ in range(N)]
X,Y = [list(i) for i in zip(*XY)]

s=0
for i in range (N):
  if X[i]*X[i]+Y[i]*Y[i]<=D*D:
    s=s+1
print(s)
n = int(input())
h = list(map(int,input().split()))
c = 1
for i in range(n):
    if h[i] >= max(h[0:i]):
        c += 1
print(c)

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
c = 1
for i in range(1,n):
    if h[i] >= max(h[:i]):
        c += 1
print(c)
a, b = map(int, input(). split())
if (a*b) % 2:
    ptint('Odd')
else:
    print('Even')

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
k, s = map(int, input().split())

ans = 0

num_list = [i for i in range(0, k+1)]
num_list2 = [i+j for i in range(0, k+1) for j in range(0, k+1)]

for num in num_list2:
    l, r = 0, k
    t = s - num
    while l <= r:
        m = (l+r) // 2
        if num_list[m] == t:
            ans += 1
            break
        elif num_list[m] < t:
            l = m + 1
        elif num_list[m] > t:
            r = m - 1

print(ans)


### FIXED CODE ###

s = input()

print(s.replace(",", " "))
##### 解けた #####

from math import sqrt

ab=int("".join(input().split(" "))))

if sqrt(ab).is_integer(): # 平方数なら
    print("Yes")
else: # 平方数ではないなら
    print("No")

### FIXED CODE ###

##### 解けた #####

from math import sqrt

ab=int("".join(input().split(" ")))

if sqrt(ab).is_integer(): # 平方数なら
    print("Yes")
else: # 平方数ではないなら
    print("No")
N = int(input('人数：'))
A = int(input('電車賃：'))
B = int(input('タクシー代：'))
l=N*A
if l>B:
    print(B)
else:
    print(l)

### FIXED CODE ###

N,A,B = map (int,input().split())
l=N*A
if l>B:
    print(B)
else:
    print(l)
import math
n,k=map(int,input().split())
log=list(map(int,input().split()))
a=0
b=max(log)
c=(a+b)//2
while True:
  div=0
  for i in range(n):
    div+=math.ceil(log[i]/c)-1
  if div<=k:
    b=c
    c=(a+b)//2
  else:
    a=c
    c=(a+b)//2
    
  if c==a or c==b:
    break
print(b)

### FIXED CODE ###

import math
n,k=map(int,input().split())
log=list(map(int,input().split()))
a=0
b=max(log)
if b==1:
  print(1)
  exit()
c=(a+b)//2
while True:
  div=0
  for i in range(n):
    div+=math.ceil(log[i]/c)-1
  if div<=k:
    b=c
    c=(a+b)//2
  else:
    a=c
    c=(a+b)//2
    
  if c==a or c==b:
    break
print(b)
mod=1000000007
n,m=map(int,input().split())
a=[]
for i in range(m):
    a.append(int(input()))
f=0
for i in range(len(a)):
    if a[i]+1 in a:
        f=1
        break
        
dp=[0]*(n+1)
dp[0]=1
if 1 in a:
    dp[1]=0
else:
    dp[1]=1
    
for i in range(2,n+1):
    if i in a:
        dp[i]=0
    else:
        dp[i]=(dp[i-1]+dp[i-2])%mod

if f==1:
    print(0)
else:
    print(dp[n]%mod)
  

### FIXED CODE ###

l=list(map(int,input().split()))
print(sum(l)-max(l))
import math
from functools import reduce

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


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


max_gcd = 0

for i in range(N):
    popped = A.pop(i)
    tmp_max_gcd = gcd_list(A)
    if tmp_max_gcd > max_gcd:
        max_gcd = tmp_max_gcd
    A.insert(i, popped)

print(max_gcd)


### FIXED CODE ###

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)


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

gcd_l = [0] * N

gcd_l[0] = A[0]
for i in range(1, N):
    gcd_l[i] = gcd(gcd_l[i - 1], A[i])

gcd_r = [0] * N

gcd_r[N - 1] = A[N - 1]
for i in reversed(range(0, N - 1)):
    gcd_r[i] = gcd(gcd_r[i + 1], A[i])

gcd_lr = [0] * N

for i in range(N):
    if i == 0:
        gcd_lr[i] = gcd_r[i + 1]
    elif 1 <= i <= N - 2:
        gcd_lr[i] = gcd(gcd_l[i - 1], gcd_r[i + 1])
    elif i == N - 1:
        gcd_lr[i] = gcd_l[i - 1]

print(max(gcd_lr))
s = input()
t = input()

ans = 0
for i in range(s-t+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] == t[j]:
            cnt += 1
    ans = max(ans,cnt)

print(len(t)-ans)


### FIXED CODE ###

s = input()
t = input()

ans = 0
for i in range(len(s)-len(t)+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] == t[j]:
            cnt += 1
    ans = max(ans,cnt)

print(len(t)-ans)
from math import gcd

n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
    g = gcd(g, a[i])
print(g)

### FIXED CODE ###

from fractions import gcd

n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
    g = gcd(g, a[i])
print(g)
n = int(input())
a = list(map(int,input().split()))

ans = 0
while True:
  e_max = max([i for i in a if i % 2 == 0])
  if len(e_max) != 0:
    a = [i / 2 if i == e_max else i * 3 for i in a]
    ans += 1
print(ans)
  

### FIXED CODE ###

n = int(input())
a = list(map(int,input().split()))
 
ans = 0
e = [i for i in a if i % 2 == 0]
for i in e:
  sum = 0
  while True:
    i = i / 2
    sum += 1
    if i % 2 != 0:
      break
  ans += sum
print(ans)
A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
X=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    X=['X' if j==y else j for j in x]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')

### FIXED CODE ###

A=list(map(int,input().split()))
B=list(map(int,input().split()))
C=list(map(int,input().split()))
X=A+B+C
n=int(input())
for i in range (n):
    y=int(input())
    X=['X' if j==y else j for j in X]
if X[0]==X[3]==X[6]=='X':
    print('Yes')
elif X[1]==X[4]==X[7]=='X':
    print('Yes')
elif X[2]==X[5]==X[8]=='X':
    print('Yes')
elif X[0]==X[1]==X[2]=='X':
    print('Yes')
elif X[3]==X[4]==X[5]=='X':
    print('Yes')
elif X[6]==X[7]==X[8]=='X':
    print('Yes')
elif X[0]==X[4]==X[8]=='X':
    print('Yes')
elif X[2]==X[4]==X[6]=='X':
    print('Yes')
else:
    print('No')
from sys import stdin
n,m,k = map(int, stdin.readline().rstrip().split())
a = list(map(int, stdin.readline().rstrip().split()))
b = list(map(int, stdin.readline().rstrip().split()))

A = [0]
B = [0]
ans,res = 0,0
for i in range(0, n):
    A.append(A[i]+a[i])
for i in range(0, m):
    B.append(B[i]+b[i])

def ans(A, B):
    for i in range(0, n + 1):
        j = 0
        while A[i] + B[j + 1] <= k:
            j += 1
            if j == len(B) - 1:
                break

        ans = max(ans, i + j)
    return ans

if A[1] > k and B[1] > k:
    print(0)
else:
    res = ans(A, B)
    print(res)

### FIXED CODE ###

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

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


a_pre,b_pre=[0],[0]

for i in range(n):
	a_pre.append(a_pre[i]+a[i])

for i in range(m):
	b_pre.append(b_pre[i]+b[i])

ans,j=0,m
for i in range(n+1):
	if a_pre[i]>k:
		break
	while b_pre[j]>k-a_pre[i]:
		j-=1

	ans=max(ans,i+j)

print(ans)
A, B, C, D, E, F = map(int, input().split())

water = []
for i in range(F//(A*100) + 1):
    for j in range(F//(B*100) + 1):
        n = (i*A + j*B)*100
        if n <= F:
            water.append(n)
water = sorted(list(set(water)))

result = {}
noud = []
for i in water:
    suger_limit = E*(i//100)
    for j in range(suger_limit//C + 1):
        for k in range(suger_limit//D + 1):
            n = j*C + k*D
            if n <= suger_limit and i + n <= F and n != 0:
                noudo = 100*n/(i+n)
                noud.append(noudo)
                
                result[str(noudo)] = [i+n,n]


a,b = map(int,result[str(max(noud))])

print(a,b)

### FIXED CODE ###

A, B, C, D, E, F = map(int, input().split())

water = []
for i in range(F//(A*100) + 1):
    for j in range(F//(B*100) + 1):
        n = (i*A + j*B)*100
        if n <= F:
            water.append(n)
water = sorted(list(set(water)))

density_d = {}
density = []

for i in water:
    suger_limit = E*(i//100)

    suger = []

    for j in range(suger_limit//C + 1):
        for k in range(suger_limit//D + 1):
            n = j*C + k*D
            if n <= suger_limit and n + i <= F:
                suger.append(n)
    suger = max(suger)
    if i+suger == 0:
        continue
    else:
        density.append(100*suger/(i+suger))
        density_d[100*suger/(i+suger)] = [i + suger, suger]
density = list(set(density))
a, b = map(int, density_d[max(density)])
print(a,b)
n,m = input().split()
n = int(n)
m = int(m)

i = m - n

if i <= 0:
        print(0)
else:
        count = 1
        while i > 0:
                i -= n-1
                count += 1
        print(count)

### FIXED CODE ###

a = input()
b = input()

x =0

for i in range(3):
    if a[i] == b[i]:
        x += 1

print(x)
N = int(input())
s = [0,1]
for i in range(2,N):
    for j in range(2,i**0.5+1):
        if i % j == 0:
            k = i//j
            s.apppend(2*s[k])
            break
    if len(s) != i:
        s.append(1)
print(sum(s))

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1,N):
    x = (N-1)//i
    ans += x
print(ans)
n = int(input())
s = list(input())
ans = []
abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
for i in range(n):
  ans.append(abc[(abc.index(s[i])+n) % 26])
  print(s[i])
print("".join(ans))

### FIXED CODE ###

n = int(input())
s = list(input())
x = len(s)
ans = []
abc = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
for i in range(x):
  ans.append(abc[(abc.index(s[i])+n) % 26])
print("".join(ans))
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import math

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

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

a_ = prime_factorize(a)
b_ = prime_factorize(b)

for i in a_:
    if i in b_:
        b_.remove(i)

for j in b_:
    a *= j

print(a)
N,L=map(int,input().split())
S=[input() for n in range(N)]
for num in range(L):
    ans1=S[num]
    for num2 in range(L):

        ans2=S[num2]
        for i in range(L):
            if ans1[i]>ans2[i]:
                break
            elif ans1[i]==ans2[i]:
                continue
            else :
                S[num],S[num2]=S[num2],S[num]
                break
print("".join(S))

### FIXED CODE ###

N,L=map(int,input().split())
S=[input() for n in range(N)]
S=sorted(S)
"""for num in range(L):
    ans1=S[num]
    for num2 in range(L):

        ans2=S[num2]
        for i in range(L):
            if ans1[i]>ans2[i]:
                break
            elif ans1[i]==ans2[i]:
                continue
            else :
                S[num],S[num2]=S[num2],S[num]
                break
"""
print("".join(S))
s = raw_input()
t = raw_input()
ans = 0
for i in len(s):
  if s[i] == t[i]: ans += 1
print ans

### FIXED CODE ###

s = raw_input()
t = raw_input()
ans = 0
for i in xrange(len(s)):
  if s[i] == t[i]: ans += 1
print ans
n = int(input())
c = input()
c = [char for char in c]

def op1(l, id1, id2):
    temp = l[id1]
    l[id1] = l[id2]
    l[id2] = temp
    return l

r_idx, w_idx = [], []
for j in range(n):
    if c[j] == "R":
        r_idx.append(j)
    elif c[j] == "W":
        w_idx.append(j)

ans = 0
for i in range(min(len(r_idx), len(w_idx))): # i is number of op1
    c_i = c[:]
    c_i = op1(c_i, w_idx[j], r_idx[-j - 1])
    ans[i] += 1
if "W" in "".join(c_i).rstrip("W"):
    ans[i] += "".join(c_i).rstrip("W").count("W")
print(min(ans))

### FIXED CODE ###

n = int(input())
c = input()
c = [char for char in c]

ans = 0
for i in range(c.count("R")):
    if c[i] == "W":
        ans += 1

print(ans)
from heapq import heappush,heappop

n,m=[int(x) for x in input().rstrip().split()]
ab=[[] for i in range(10**5)]

for i in range(n):
  a,b=[int(x) for x in input().rstrip().split()]
  ab[m-a].append(-b)


ans=0
time=0
l=[]
for i in range(m,-1,-1):
  for b in ab[i]:
    heappush(l,b)

  if l:
    ans-=heappop(l)

print(ans)


### FIXED CODE ###

from heapq import heappush,heappop

n,m=[int(x) for x in input().rstrip().split()]
ab=[[] for i in range(10**5)]

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

ans=0
time=0
l=[]
for i in range(m):
  for b in ab[i]:
    heappush(l,b)
  if l:
    ans-=heappop(l)

print(ans)
S = input()
if S == "ABC:
	print("ARC")
else:
  print("ABC")

### FIXED CODE ###

S = input()
if S == "ABC":
	print("ARC")
else:
  print("ABC")
def gcd(a,b):
  if a%b==0:
    return b
  else:
    return gcd(b,a%b)
N,X=map(int,input().split())
print(3*(N-gcd(N,X))


### FIXED CODE ###

def gcd(a,b):
  if a%b==0:
    return b
  else:
    return gcd(b,a%b)
N,X=map(int,input().split())
print(3*(N-gcd(N,X)))
#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)

time_residual_notZero = [i for i in time_residual if i%10 != 0 ]
# print(time_residual_notZero)

ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
print(ans)

### FIXED CODE ###

#2019/10/04
time = list(map(int, open(0).read().split()))
# print(time)

time_residual = [i%10 for i in time]
# print(time_residual)

time_residual_notZero = [i for i in time_residual if i%10 != 0 ]
# print(time_residual_notZero)

if(time_residual_notZero != []):
    ans = sum([-(-i//10)*10 for i in time]) + min(time_residual_notZero) - 10
else:
    ans = sum(time)
print(ans)
A = int(input())
B = int(input())
int i = 0

for i in range(25):
  if B <= A + (A-1)*i:
    print(i + 1)
    break
  else:


### FIXED CODE ###

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

if B ==1:
  print(0)

else:
  for i in range(19):
    if B <= A + (A-1)*i:
      print(i + 1)
      break
while True:
    if input()=="-1 -1 -1":
        break
    points = list(map(int,input().split()))
    gou = points[0] + points[1]
    if gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")

### FIXED CODE ###

while True:
    points = list(map(int,input().split()))

    if points == [-1,-1,-1]:
        break

    gou = points[0] + points[1]
    if points[0]==-1 or points[1]==-1:
        print("F")
    elif gou >= 80:
        print("A")
    elif 65 <= gou < 80:
        print("B")
    elif 50 <= gou < 65:
        print("C")
    elif 30 <= gou < 50:
        if points[2] >= 50:
            print("C")
        else:
            print("D")
    else:
        print("F")
import numpy as np
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all( (np.array(s)%2) == 0):
    count += 1
  else:
    break
print(count)


### FIXED CODE ###

import numpy as np
N = input()
s = np.array(list(map(int, input().split())))
count = 0
while True:
  _exp = 2**(count+1)
  if np.all( s%_exp == 0):
    count += 1
  else:
    break
print(count)
import sys


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


# A
def A():
    s = input()
    if s == "Sunny":
        print("Cloudy")
    elif s == "Cloudy":
        print("Rainy")
    else:
        print("Sunny")
    return


# B
def B():
    s = S()
    for i in range(len(s))
        if i % 2:
            if s[i] not in ["L", "U", "D"]:
                print("No")
                return
        else:
            if s[i] not in ["R", "U", "D"]:
                print("No")
                return
    print("Yes")
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()


### FIXED CODE ###

import sys


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


# A
def A():
    s = input()
    if s == "Sunny":
        print("Cloudy")
    elif s == "Cloudy":
        print("Rainy")
    else:
        print("Sunny")
    return


# B
def B():
    s = S()
    for i in range(len(s)):
        if i % 2:
            if s[i] not in ["L", "U", "D"]:
                print("No")
                return
        else:
            if s[i] not in ["R", "U", "D"]:
                print("No")
                return
    print("Yes")
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()
N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
mod = 1000000007
dp = [0]*(N+1)
dp[0] = 1
if a[0] != 1:
    dp[1] = 1
for i in range(2, N+1):
    if i not in a:
        dp[i] = (dp[i-1]+dp[i-2])%mod
print (dp[N])

### FIXED CODE ###

N, M = map(int, input().split())
a = [int(input()) for _ in range(M)]
a = set(a)
mod = 1000000007
dp = [0]*(N+1)
dp[0] = 1
for i in range(1, N+1):
    if i not in a:
        if i == 1:
            dp[i] = dp[i-1]
        else:
            dp[i] = (dp[i-1]+dp[i-2])%mod
print (dp[N])
from fractions import gcd

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

dX = [abs(X - x) for x in X_list]
if len(dX) == 1:
    print(dX[0])
    exit(0)

D = [abs(X_list[i] - X_list[i + 1]) for i in range(0, N - 1)]
res = gcd(D[0], D[1])
for x in D[2:]:
    res = gcd(res, x)

ans = 0
for d in dX:
    ans = max(gcd(res, d), ans)
print(ans)


### FIXED CODE ###

from fractions import gcd

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

dX = [abs(X - x) for x in X_list]
if len(dX) == 1:
    print(dX[0])
    exit(0)

D = [abs(X_list[i] - X_list[i + 1]) for i in range(0, N - 1)]
res = D[0]
for x in D[1:]:
    res = gcd(res, x)

ans = 0
for d in dX:
    ans = max(gcd(res, d), ans)
print(ans)
import sys
def input(): return sys.stdin.readline().rstrip()

def main():
    n, m = map(int, input().split())
    ps = [input() for _ in range(m)]

    ac = set()
    wa = [0] * m

    for i in ps:
        p, s = i.split()
        p = int(p)
        if s == 'AC':
            ac.add(p)
        elif p not in ac and s == 'WA':
            wa[p] += 1
    print(len(ac), sum(wa))

if __name__ == '__main__':
    main()

### FIXED CODE ###

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

def main():
    n, m = map(int, input().split())
    ac = set()
    wa = [0] * (n+1)

    for _ in range(m):
        p, s = input().split()
        p = int(p)
        if p in ac:
            continue
        if s == 'AC':
            ac.add(p)
        elif s == 'WA':
            wa[p] += 1
    wa = [j for i, j in enumerate(wa) if i in ac]
    print(len(ac), sum(wa))

if __name__ == '__main__':
    main()
def takahashi_cal(m: int, d: int) -> int:
    res = 0
    for mm in range(1, m + 1):
        for dd in range(1, d + 1):
            d1 = dd % 10
            d10 = dd // 10
            if any([d1 < 2, d10 < 2]):
                continue
            if d1 * d10 == mm:
                res += 1
    return res
  
  m, d = input().split(" ")
  print(takahashi_cal(m, d))

### FIXED CODE ###

def takahashi_cal(m: int, d: int) -> int:
    res = 0
    for mm in range(1, m + 1):
        for dd in range(1, d + 1):
            d1 = dd % 10
            d10 = dd // 10
            if any([d1 < 2, d10 < 2]):
                continue
            if d1 * d10 == mm:
                res += 1
    return res
    
m, d = input().split(" ")
print(takahashi_cal(int(m), int(d)))
N =0 int(input())
for i in range(1, 10):
    if((i-1)*111<x and x<=i*111)
    print(i*111)

### FIXED CODE ###

N = int(input())
for i in range(1, 10):
    if((i-1)*111<N and N<=i*111):
        print(i*111)
if A == B:
    print("H")
elif A != B:
    print("D")

### FIXED CODE ###

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

if A == B:
    print("H")
elif A != B:
    print("D")