N = int(input())
M = int(input())

if (N > M):
    a = N // M
    b = N % M
elif (N < M):
    a = M // N
    b = M % N
print(a)
print(b)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: