# p11.py
n = int(input())
m = int(input())

print(n + m)
print(n - m)
print(n * m)
print(int(n / m))
print(n / m)
print(pow(n, m))
print(n % m)

# p11.py
n = int(input())
m = int(input())

print(n + m)
print(n - m)
print(n * m)
print(int(n / m))
print(n / m)
print(pow(n, m))
print(n % m)
