This page is still under construction.

Parts of this page are still being built. What you see may change.

Basic arithmetic

Time limit1sMemory limit256 MB

Summary
Print the sum, difference, product, quotient, and remainder of two given natural numbers.
Level

Easy1 of 10

Topics
Implementation
Solved
No attempts yet

Problem

You are given two natural numbers AA and BB. Write a program that prints A+BA+B, A−BA-B, A×BA \times B, the quotient of AA divided by BB, and the remainder of AA divided by BB, each on its own line.

Input

The first line contains the two natural numbers AA and BB, separated by a space. (1≤A,B≤100001 \le A, B \le 10000)

Output

Print A+BA+B on the first line, A−BA-B on the second line, A×BA \times B on the third line, the quotient of AA divided by BB on the fourth line, and the remainder of AA divided by BB on the fifth line. The quotient and the remainder are both integers.

Examples6

  1. Example 1

    Input
    7 3
    
    Expected output
    10
    4
    21
    2
    1
    
  2. Example 2

    Input
    1 1
    
    Expected output
    2
    0
    1
    1
    0
    
  3. Example 3

    Input
    10000 10000
    
    Expected output
    20000
    0
    100000000
    1
    0
    
  4. Example 4

    Input
    1 10000
    
    Expected output
    10001
    -9999
    10000
    0
    1
    
  5. Example 5

    Input
    10000 1
    
    Expected output
    10001
    9999
    10000
    10000
    0
    
  6. Example 6

    Input
    3 7
    
    Expected output
    10
    -4
    21
    0
    3