n1 = int(input())
n2 = int(input())
cont = 0
for n3 in range (1,50):
    if (n3 < 50) and (n3 % n1 == 0) and (n3 % n2 == 0):
        cont = cont + 1
print (cont)

5e69d63c388348af9e5ecb5b5c8ca2fbf298263b
<mask token>

<mask token>
for n3 in range(1, 50):
    if n3 < 50 and n3 % n1 == 0 and n3 % n2 == 0:
        cont = cont + 1
print(cont)

n1 = int(input())
n2 = int(input())
cont = 0
for n3 in range(1, 50):
    if n3 < 50 and n3 % n1 == 0 and n3 % n2 == 0:
        cont = cont + 1
print(cont)

n1 = int(input())
n2 = int(input())
cont = 0
for n3 in range (1,50):
    if (n3 < 50) and (n3 % n1 == 0) and (n3 % n2 == 0):
        cont = cont + 1
print (cont)
