#HackerRank Solutions

# Language       : Python
# Domain         : Python 
# Sub Domain     : Introduction Challenges
# Challenge Name : Power - Mod Power

#Solution Code follows

a = int(raw_input())
b = int(raw_input())
print a//b;
print a%b;
print divmod(a,b);