Harryxun/stf_run huggingface dataset:
L,R = list(map(int, input().split()))


MOD=[0] * (2019*2019)

def myidx(i,j):
    return i * 2019 + j

for i in range(2019):
    for j in range(2019):
        idx = myidx(i,j)
        MOD[idx] = (i*j) % 2019

for i in range(2019):
    idx = myidx(i,i)
    MOD[idx] = 2019

MMM = []
Lmod = L % 2019
Rmod = R % 2019

if L+2019 <= R:
    for i in range(2019):
        for j in range(i+1,2019):
            idx = myidx(i,j)
            MMM.append(MOD[idx])
elif Lmod <= Rmod:
    for i in range(Lmod, Rmod+1):
        for j in range(i+1, Rmod+1):
            idx = myidx(i,j)
            MMM.append(MOD[idx])

elif Lmod > Rmod:
    for i in list(range(0,Rmod+1)) + list(range(Lmod, 2019)):
        for j in list(range(i+1,Rmod+1)) + list(range(i+1, 2019)):
            idx = myidx(i,j)
            MMM.append(MOD[idx])

MMM=list(set(MMM)).sort()
print(MMM.pop(0))


### FIXED CODE ###

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

MOD=[0] * (2019*2019)

def myidx(i,j):
    return i * 2019 + j

for i in range(2019):
    for j in range(i+1,2019):
        idx = myidx(i,j)
        MOD[idx] = (i*j) % 2019

#for i in range(2019):
#    idx = myidx(i,i)
#    MOD[idx] = 2019

MMM = []
MIN = 2019
Lmod = L % 2019
Rmod = R % 2019

if L+2019 <= R:
    for i in range(2019):
        for j in range(i+1,2019):
            idx = myidx(i,j)
            MIN = min(MIN, MOD[idx])
            #MMM.append(MOD[idx])
elif Lmod <= Rmod:
    for i in range(Lmod, Rmod+1):
        for j in range(i+1, Rmod+1):
            idx = myidx(i,j)
            MIN = min(MIN, MOD[idx])
            #MMM.append(MOD[idx])

elif Lmod > Rmod:
    for i in list(range(0,Rmod+1)) + list(range(Lmod, 2019)):
        for j in list(range(i+1,Rmod+1)) + list(range(max(Lmod,i+1), 2019)):
            idx = myidx(i,j)
            MIN = min(MIN, MOD[idx])
            #MMM.append(MOD[idx])

#MMM=list(set(MMM))
#MMM.sort()
#print(MMM.pop(0))
print(MIN)
S = 'ACABABAABABA'
x,y = map(int, input().split())
print('Yes' if S[x]==S[y] else 'No')

### FIXED CODE ###

S = 'ACABABAABABA'
x,y = map(int, input().split())
print('Yes' if S[x-1]==S[y-1] else 'No')
import math
a,b,c=map(int,input().split())
d=math.gcd(a,b)

if c%d==0:
    print("YES")
else:
    print("NO")


### FIXED CODE ###

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

k=0
x="NO"
for i in range(b):
    k=(k+a)%b
    if k==c:
        x="YES"
        break
print(x)
import math
a = [input().split() for l in range(3)]
if sum(a[1]) >= a[0][0]
	print("Yes")
else
	print("No")

### FIXED CODE ###

a = [list(map(int,input().split())) for l in range(2)]

if sum(a[1]) >= a[0][0]:
    print("Yes")
else:
    print("No")
#-*- coding:utf-8 -*-

while 1:
    n = int(raw_input())
    if not n:
        break
    length = n*n
    columns = []
    for i in range(n):
        columns.append([])
    rows = [0]*(length) #列の最小値となっている数
    for i in range(n):
        row = [int(r) for r in raw_input().split(" ")]
        rows[min(row)] = 1
        for i in range(n):
            columns[i].append(row[i])

    result = 0
    for c in columns:
        if rows[max(c)]:
            result = max(c)
            break

    print result

### FIXED CODE ###

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

while 1:
    n = int(raw_input())
    if not n:
        break
    columns = []
    for i in range(n):
        columns.append([])
    rows = []
    for i in range(n):
        row = [int(r) for r in raw_input().split(" ")]
        rows.append(min(row))
        for i in range(n):
            columns[i].append(row[i])

    result = 0
    for c in columns:
        if max(c) in rows:
            result = max(c)
            break

    print result
a,b,c = map(int, input().split())
if a < b && b < c:
   print("Yes")
else:
   print("No")



### FIXED CODE ###

a, b, c = map(int, input().split())
if a < b and b < c:
   print("Yes")
else:
   print("No")
import sympy
def I(): return int(input())
N = I()
ans = 0
if N>=105:
    for i in range(105,N+1,2):
        if len(sympy.divisors(i))==8:
            ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for n in range(1, N+1, 2):
  yaku = 0
  for i in range(1, n+1):
    if n%i == 0:
      yaku += 1
  if yaku == 8:
    ans += 1
print(ans)
import sys
def order (p):
    return (sorted(p))         
def Mix_Juice (p):
    p[1] = K
    a = order (p[2:])
    b = 0
    for i in range (0, K):
        b = b + a[i]
    return b
p = list(map(int, input().split()))
Mix_Juice (p)

### FIXED CODE ###

n = input()
m = n.split()

a = [input() for l in range(0,1)]
b = a[0].split()


for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)

p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))
W, H, x, y = map(int, input().split())

# 縦に分ける場合
s1, s2 = x * H, (W - x) * H

# 横に分ける場合
s3, s4 = W * y, W * (H - y)

ans = max(min(s1, s2), min(s3, s4))

if min(s1, s2) == min(s3, s4):
    print(f'{ans} 1')
else:
    print(f'{ans} 0')


### FIXED CODE ###

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

if W/2 == x and H/2 == y:
    ans = 1
else:
    ans = 0
print(W*H/2, ans)
def calc(N, D):
    if D[0] != 0:
        return 0
    d = {}
    for Di in D:
        d[Di] = 1 + (d[Di] if Di in d else 0)
    if d[0] != 1:
        return 0
    result = 1
    for i in range(max(d.keys())):
        if d[i + 1] == 0:
            return 0
        result *= d[i] ** d[i + 1]
    return result


N = int(input())
D = [int(s) for s in input().split()]
print(calc(N, D))

### FIXED CODE ###

Z = 998244353


def calc(N, D):
    if D[0] != 0:
        return 0
    d = {}
    for Di in D:
        d[Di] = 1 + (d[Di] if Di in d else 0)
    if d[0] != 1:
        return 0
    result = 1
    for i in range(max(d.keys())):
        if not i + 1 in d:
            return 0
        result *= (d[i] ** d[i + 1]) % Z
        result = result % Z
    return result


N = int(input())
D = [int(s) for s in input().split()]
print(calc(N, D))
N = int(raw_input())
A = map(int,raw_input().split())

count=1
z1=0
for i in range(N-1):
    if A[i+1]-A[i]>0:
        z2=1
    elif A[i+1]-A[i]<0:
        z2=-1
    elif A[i+1]-A[i]==0:
        z=0
    if z2*z1<0:
        count+=1
    if z2!=0:
        z1=z2

print str(count)

### FIXED CODE ###

N = int(raw_input())
A = map(int,raw_input().split())

count=1
z1=0
for i in range(N-1):
    if A[i+1]-A[i]>0:
        z2 = 1
    elif A[i+1]-A[i]<0:
        z2 = -1
    elif A[i+1]-A[i]==0:
        z2 = 0
    if z2*z1<0:
        count+=1
        z1=0
    elif z2!=0:
        z1=z2

print str(count)
a,b=map(int, input().split())
c=list(map(int, input().split())) 
 
l = [1]
tmp = 1
s = 0
for i in range(b):
    l.append(c[tmp-1])
    tmp = c[tmp-1]
    d = l.count(l[i])
    if d > 1:
        s = l[i]
        t = i + 1
        break

#print(l)
if a > b:
    print(l[b])
    exit()

h = l.index(s) + 1

#print(s,h,t)
l2 = l[h-1:t-1]
#print(l2)
if s == 1:
    id = b % (t - 1)
    print(l2[id])
else:
    id = (b - h + 1) % (t - h)
    print(l2[id])

### FIXED CODE ###

a,b=map(int, input().split())
c=list(map(int, input().split())) 
 
l = [1]
f = [0]*a
f[0] += 1
tmp = 1
s = 0
for i in range(b):
    l.append(c[tmp-1])
    tmp = c[tmp-1]
    if f[tmp-1] != 0:
        s = c[tmp-1]
        t = len(l)+1
        break
    f[tmp-1] += 1

#print(l)
if a > b:
    print(l[b])
    exit()

h = l.index(s) + 1

#print(s,h,t)
l2 = l[h-1:t-1]
#print(l2)
if s == 1:
    id = b % (t - 1)
    print(l2[id])
else:
    id = (b - h + 1) % (t - h)
    print(l2[id])
from statistics import median
N = int(input())
X = list(map(int, input.split()))

Y = X + [0]
Z = X + [10*9+1]

ymed = median(ymed)
zmed = median(zmed)

if ymed == zmed:
  for _ in range(N):
    print(ymed)
else:
  for i in X:
    if i <= ymed:
      print(zmed)
    else:
      print(ymed)

### FIXED CODE ###

from statistics import median
N = int(input())
X = list(map(int, input().split()))

Y = X + [0]
Z = X + [10**9 + 1]

ymed = median(Y)
zmed = median(Z)

if ymed == zmed:
    for _ in range(N):
        print(ymed)
else:
    for i in X:
        if i <= ymed:
            print(zmed)
        else:
            print(ymed)
a,b=map(int,input().split())
if x%y==0:
    print(-1)
else:
    print(a*(b-1))

### FIXED CODE ###

x,y=map(int,input().split())
if x%y==0:
    print(-1)
else:
    print(x*(y-1))
def f(n, ans):
    for k, c in dic.items():
        a, b = k
        if a == n:
            if not b in cost or c < cost[b]:
                cost[b] = c
        elif b == n:
            if not a in cost or c < cost[a]:
                cost[a] = c
    for k, c in sorted(cost.items(), key=lambda x: x[1]):
        if not k in res:
            res.append(k)
            ans += c
            del dic[k]
            return f(k, ans)
    return ans
            
while True:
    n, m = map(int, raw_input().split())
    if n == m == 0: break
    dic = {}
    s, b, c = map(int, raw_input().split())
    dic[(s, b)] = c
    for i in range(m-1):
        a, b, c = map(int, raw_input().split())
        dic[(a, b)] = c
    cost = {}
    res = [s]
    print f(s, 0)

### FIXED CODE ###

def f(s, cost, route, ans):
    route.append(s)
    ans += cost[s]
    del cost[s]
    for k, c in data.items():
        if s in k:
            a, b = k
            if s == a:
                if not b in route:
                    if not b in cost or c < cost[b]:
                        cost[b] = c
                        del data[(a, b)]
            elif s == b:
                if not a in route:
                    if not a in cost or c < cost[a]:
                        cost[a] = c
                        del data[(a, b)]
    if cost:
        s = sorted(cost.items(), key=lambda x: x[1])[0][0]
        return f(s, cost, route, ans)
    return ans

while 1:
    n, m = map(int, raw_input().split())
    if n == m == 0: break
    data = {}
    for i in range(m):
        a, b, c = map(int, raw_input().split())
        data[(a, b)] = c
    print f(0, {0:0}, [], 0)
from collections import Counter

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

if len(A.keys()) >= 3:
    print('No')
    exit()

if len(A.keys()) == 1:
    p = list(A.keys())[0]
    print('Yes' if 2 * p <= N or p == N - 1 else 'No')
    exit()

p1, p2 = sorted(A.keys())
1 / 0
print('Yes' if [p1, p2] == [1, 2] and A[1] == 1 else 'No')


### FIXED CODE ###

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

minColor = min(A)
maxColor = max(A)

if minColor == maxColor:
    if minColor == N - 1:  # 各色の猫が1匹ずつ
        print('Yes')
    elif minColor * 2 <= N:  # 各色の猫が2匹以上
        print('Yes')
    else:
        print('No')
    exit()

if minColor + 1 != maxColor:
    print('No')
    exit()

minCnt = 0
maxCnt = 0

for a in A:
    if a == minColor:
        minCnt += 1
    elif a == maxColor:
        maxCnt += 1
    else:
        print('No')
        exit()

# minCnt : 1匹だけの色
# maxCnt : 2匹以上の色
# 全体でmaxColor個の色

if (maxColor - minCnt) * 2 <= maxCnt and maxColor >= minCnt + 1:
    print('Yes')
else:
    print('No')
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 fractions

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

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

print(lcm(a,b))
N, P = map(int, input().split())
def prime_factorize(n):
    a = []
    N = n
    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

lis = prime_factorize(P)
#print(lis)
if N == 1:
    print(P)
else:
    d = [0] * (10 ** 6 + 5)
    for i in lis:
        d[i] += 1
    #print(d[:24])
    #print(d[103])
    lis2 = []
    for i in reversed(range(10 ** 6 + 5)):
        if d[i] >= N:
            val = d[i] // N
            lis2.append(pow(i,val))
    ans = 1
    for i in lis2:
        ans *= i
    print(ans)


### FIXED CODE ###

from math import sqrt
N, P = map(int, input().split())
def prime_factorize(n):
    a = []
    N = n
    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

lis = prime_factorize(P)
#print(lis)
if N == 1:
    print(P)
    exit()

else:
    d = [0] * (10 ** 7)
    sq = sqrt(P) + 1
    for i in lis:
        if i < sq:
            d[i] += 1
    #print(d[:24])
    #print(d[103])
    lis2 = []
    for i in reversed(range(10 ** 6 + 5)):
        if d[i] >= N:
            val = d[i] // N
            lis2.append(pow(i,val))
    ans = 1
    for i in lis2:
        ans *= i
    print(ans)
N, K = input().split(" ")
N, K = int(N), int(K)
S = input()

def syukuyaku(S):
    if len(S) <= 1:
        return S
    res = S[0]
    cnt = 0
    i = 0
    while i < len(S)-1:
        if S[i] == S[i+1]:
            while i < len(S)-1 and S[i] == S[i+1]:
                cnt += 1
                i += 1
        else:
            i += 1
            res += S[i]
    return res, cnt

S_ ,cnt = syukuyaku(S)

if S_.count("L") == S_.count("R"):
    if S_.count("L") <= K:
        print(cnt + S_.count("L")*2)
    else:
        print(cnt + K * 2)
elif S_.count("L") > S_.count("R"):
    if S_.count("L") <= K:
        print(len(S)-1)
    else:
        print(cnt + K * 2)
else:
    if S_.count("R") <= K:
        print(len(S)-1)
    else:
        print(cnt + K * 2)

### FIXED CODE ###

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

sut = 0
a = ""
for i,s in enumerate(b):
    if i < n-1:
        if b[i] == b[i+1]:
            sut += 1
        else:
            a += s
    else:
        a+=s
a

count = len(a)
for i in range(k):
    if count <= 1:
        break
    elif count >= 3:
        sut += 2
        count -= 2
    elif count == 2:
        sut += 1
        break
print(sut)
S = input()
if S=="AAA" or S="BBB":
  print("No")
else:
  print("Yes")

### FIXED CODE ###

S = input()
if S=="AAA" or S=="BBB":
    print("No")
else:
    print("Yes")
s = int(input())
num = [int(input()) for _ in range(n)]
ans = 0

for i in set(num):
    if num.count(i)%2 == 1:
        ans += 1

print(ans)


### FIXED CODE ###

n = int(input())
a = sorted([int(input()) for _ in range(n)])
ans = 0
count = 0
pre = a[0]

for i in range(n):
    if a[i] == pre:
        count+=1
    else:
        pre = a[i]
        if count%2 == 1:
            ans += 1
        count = 1
if count%2 == 1:
    ans += 1
print(ans)
s, w = map(int, input().sprit())

if(s>=w):
    print(safe)
else
    print(unsafe)

### FIXED CODE ###

s, w = map(int, input().split())

if (w>=s):
    print('unsafe')
else:
    print('safe')
import sys
input = sys.stdin.readline
s = list(input())
t = list(input())
s = sorted(s)
t = sorted(t, reverse=True)
alpha2num = lambda c: ord(c) - ord("a")
if s == t:
    print("No")
    sys.exit()
for i in range(min(len(s), len(t))):
    x, y = s[i], t[j]
    if alpha2num(x) < alpha2num(y):
        print("Yes")
        sys.exit()
    elif alpha2num(x) > alpha2num(y):
        print("No")
        sys.exit()
if len(t) > len(s):
    print("Yes")

### FIXED CODE ###

import sys
input = sys.stdin.readline
s = list(input().rstrip())
t = list(input().rstrip())
s = sorted(s)
t = sorted(t, reverse=True)
alpha2num = lambda c: ord(c) - ord("a")
if s == t:
    print("No")
    sys.exit()
for i in range(min(len(s), len(t))):
    x, y = s[i], t[i]
    if alpha2num(x) < alpha2num(y):
        print("Yes")
        sys.exit()
    elif alpha2num(x) > alpha2num(y):
        print("No")
        sys.exit()
if len(t) > len(s):
    print("Yes")
else:
    print("No")
import sys
input = sys.stdin.readline


def main():
    K, X = map(int, input().split())
    print("Yes") if 500*K >= X else print("No")


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline


def main():
    K, X = map(int, input().split())
    print("Yes") if 500*K >= X else print("No")


if __name__ == '__main__':
    main()
# -*- coding: utf-8 -*-
import math
 
def is_prime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
N= int(input())
A = input().split()
ANS = 0
for i in range(N):
  C = A[i]
  if A.count(C) == 1:
    if is_prime(i) == True:
      ANS += 1
print(ANS)

### FIXED CODE ###

# -*- coding: utf-8 -*-
# 整数の入力
a,b,c,d,e = map(int, input().split())
if a == 0:
  print (1)
elif b == 0:
  print (2)
elif c == 0:
  print (3)
elif d == 0:
  print (4)
else:
  print (5)
import sys
input_num = input()
input_list = input()
 
total_pow = 1
for num in input_list.split(" "):
  total_pow *= int(num)
  if total_pow > 10**18:
  	if "0" in input_list.split(" "):
      print("0")
    else:
      print("-1")
  	sys.exit()
print(total_pow)

### FIXED CODE ###

import sys
input_num = input()
input_list = input()
 
total_pow = 1
for num in input_list.split(" "):
    total_pow *= int(num)
    if total_pow > 10**18:
        if "0" in input_list.split(" "):
            print("0")
        else:
            print("-1")
        sys.exit()

print(total_pow)
from collections import deque

H, W = map(int, input().split())
S = [input() for _ in range(H)]
def bfs(s, t):
    dist = [[None] * W for _ in range(H)]
    que = deque([(s, t)])
    dist[s][t] = 0
    while que:
        u, v = que.popleft()
        d = dist[u][v]
        G = []
        if u > 0 and S[u-1][v] == ".":
            G.append((u-1, v))
        if u < H - 1 and S[u+1][v] == ".":
            G.append((u+1, v))
        if v > 0 and S[u][v-1] == ".":
            G.append((u, v-1))
        if v < W - 1 and S[u][v+1] == ".":
            G.append((u, v+1))
        for w, x in G:
            if dist[w][x] is not None:
                continue
            dist[w][x] = d + 1
            que.append((w, x))
    return max(max((d, (i, j)) for j, d in enumerate(di) if d is not None) for i, di in enumerate(dist))

for i in range(H):
    j = S[i].find(".")
    if j >= 0:
        break


_, (u, v) = bfs(i, j)
d, _ = bfs(u, v)
print(d)

### FIXED CODE ###

from collections import deque
H, W = map(int, input().split())
S = [input() for _ in range(H)]
def bfs(s, t):
    dist = [[None] * W for _ in range(H)]
    que = deque([(s, t)])
    dist[s][t] = 0
    while que:
        u, v = que.popleft()
        d = dist[u][v]
        G = []
        if u > 0 and S[u-1][v] == ".":
            G.append((u-1, v))
        if u < H - 1 and S[u+1][v] == ".":
            G.append((u+1, v))
        if v > 0 and S[u][v-1] == ".":
            G.append((u, v-1))
        if v < W - 1 and S[u][v+1] == ".":
            G.append((u, v+1))
        for w, x in G:
            if dist[w][x] is None:
                dist[w][x] = d + 1
                que.append((w, x))
    return max(d if d is not None else 0 for di in dist for d in di)

print(max(bfs(i, j) for i in range(H) for j in range(W) if S[i][j] == "."))
K,N=map(int,input().split())
A=list(map(int,input().split()))
l=[]
A+=A[0]+K
for i in range(N):
    l.append(A[i+1]-A[i])
print(K-max(l))

### FIXED CODE ###

K,N=map(int,input().split())
A=list(map(int,input().split()))
l=[]
A.append(A[0]+K)
for i in range(N):
    l.append(A[i+1]-A[i])
print(K-max(l))
import collecttions
l=list(map(int,input().split()))
for i in l:
  if l.count(i)!=1:
    print("NO")
    exit(0)
print("YES")
  


### FIXED CODE ###

N=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(N-1):
  if a[i]==a[i+1]:
    print("NO")
    exit(0)
print("YES")
import bisect
N=int(input())
A=[int(input()) for _ in range(N)]
color=[]
for a in A:
    i=bisect.bisect_left(color,a)
    if i==0:
        color+=[a]
    else:
        color[i]=a
        color.sort()
print(len(color))

### FIXED CODE ###

import bisect
N=int(input())
A=[int(input()) for _ in range(N)]
color=[]
A=A[::-1]
for a in A:
    i=bisect.bisect_right(color,a)
    if i==len(color):
        color.append(a)
    else:
        color[i]=a
print(len(color))
N=int(input())
H=list(map(int,input().split()))
a=0
alist=[]
for i in range(N-1):
  if H[i]>=H[i+1]:
    if i!=N-2:
      a+=1
    else:
      a+=1
      alist.append(a)
  elif H[i]<H[i+1]:
    alist.append(a)
    a=0
print(max(alist))


### FIXED CODE ###

N=int(input())
H=list(map(int,input().split()))
a=0
alist=[]
if N==1:
  print(0)
  exit()
for i in range(N-1):
  if H[i]>=H[i+1]:
    if i!=N-2:
      a+=1
    else:
      a+=1
      alist.append(a)
  elif H[i]<H[i+1]:
    alist.append(a)
    a=0
print(max(alist))
treat = input()

acc = 0
hugs = 0

for i in len(treat):
	if treat[acc] = treat[len(treat) - acc]:
		acc = acc + 1
	else:
		hugs = hugs + 1
		acc = acc + 1

print(hugs)

### FIXED CODE ###

treat = input()

acc = 0
hugs = 0

for i in range(len(treat) // 2):
	if treat[acc] == treat[len(treat) - 1 - acc]:
		acc = acc + 1
	else:
		hugs = hugs + 1
		acc = acc + 1

print(hugs)
import math
def solve(line):
    r=line[0]
    area = round((r*r*math.pi),6)
    circumference = round((2*r*math.pi),6)
    print('{0} {1}'.format(area,circumference))



    
def answer():
    line = list(map(int,input().split()))
    solve(line)

if __name__ =='__main__':
    answer()


### FIXED CODE ###

import math
def solve(line):
    r=line[0]
    area = round((r*r*math.pi),6)
    circumference = round((2*r*math.pi),6)
    print('{0} {1}'.format(area,circumference))



    
def answer():
    line = list(map(float,input().split()))
    solve(line)

if __name__ =='__main__':
    answer()
def gcdm(g,l):
    while(l):
        g,l=l,g%l
    return g
def mota(l,r,a):
    if r<a:
        total=0
    else:
        
        if l<a:
            first=a
        elif l>=a:
            if l%a==0:
                first=l
            else:
                first=(l//a + 1)*a
        #print(a,first)
        last=r-r%a
    
        total=((last-first)//a)+1
    return total
a,b,c,d=list(map(int,input().split()))
p=[c,d]
p.sort()
c,d=p[0],p[1]
total1=mota(a,b,c)

#print(total1)
total2=mota(a,b,d)
#print(total2)
h=(c*d)//gcdm(c,d)
total3=mota(a,b,h)
#print(h)
#print(total3)
print(b-a+1-(total1+total2-total3))
    


    


### FIXED CODE ###

s=input().rstrip()
if s[0]==s[1] or s[1]==s[2] or s[2]==s[3]:
    print('Bad')
else:
    print('Good')
S = input()
n = len(S)
mod = 10**9 + 7
pow10 = [0]
for i in range(1,n):
    x = pow10[-1]
    y = 10*x%13
    pow10.append(y)
dp = [[0 for i in range(13)]for j in range(n+1)]
dp[0][0] = 1
for i in range(n):
    d = S[-i-1]
    if d = '?':
        for j in range(10):
            s = pow10[i]*j%13
            for t in range(13):
                r = (s+t)%13
                dp[i][r] = (dp[i][r] + dp[i-1][t])%mod
    else:
        j = str(d)
        s = pow10[i]*j%13
        for t in range(13):
            r = (s+t)%13
            dp[i][r] = (dp[i][r] + dp[i-1][t])%mod
print(dp[n][5])

### FIXED CODE ###

S = input()
n = len(S)
mod = 10**9 + 7
pow10 = [1]
for i in range(1,n):
    x = pow10[-1]
    y = 10*x%13
    pow10.append(y)
dp = [[0 for i in range(13)]for j in range(n+1)]
dp[0][0] = 1
for i in range(n):
    d = S[-i-1]
    if d == '?':
        for j in range(10):
            s = (pow10[i]*j)%13
            for t in range(13):
                r = (s+t)%13
                dp[i+1][r] = (dp[i+1][r] + dp[i][t])%mod
    else:
        j = int(d)
        s = (pow10[i]*j)%13
        for t in range(13):
            r = (s+t)%13
            dp[i+1][r] = (dp[i+1][r] + dp[i][t])%mod
print(dp[n][5])
n,m,c = map(int,input().split())
b = map(int,input()split())
cnt = 0
sum = 0
for i in range(n):
  a = map(int,input().split())
  for j in range(m):
    sum += (a[j]*b[j])
    sum += c
  if sum > 0:
    cnt += 1
  else:
    pass
print(cnt)

### FIXED CODE ###

n,m,c = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
for i in range(n):
  a = list(map(int,input().split()))
  sum = 0
  for j in range(m):
    sum += (a[j]*b[j])
  sum += c
  if sum > 0:
    cnt += 1
  else:
    pass
print(cnt)
S = list(raw_input())
 S.sort()
 print "Yes" if S[0] == S[1] and S[2] == S[3] else "No"

### FIXED CODE ###

S = set(input())
print("Yes" if len(S) == 2 else "No")