Five Arithmetic Operations


Submit solution

Points: 100
Time limit: 0.25s
Memory limit: 256M

Author:
Problem type
Allowed languages
C, C++

In C++, there are five basic arithmetic operators: addition (+), subtraction (-), multiplication (*), division (/), and modulo (%).

Given two integers \(x\) and \(y\), print the results of applying these five operators to the two numbers.

Input

The input consists of two lines. The first line contains an integer \(x\), and the second line contains an integer \(y\).

Constraints

  • \(-10^4 \le x \le 10^4\)
  • \(-10^4 \le y \le 10^4\)
  • \(y \ne 0\)

Output

Print five lines: on the first to fifth lines, in order, output the results of \(x + y\), \(x - y\), \(x * y\), \(x / y\), and \(x \% y\).

Sample Input 1

5
2

Sample Output 1

7
3
10
2
1

Sample Input 2

5
-3

Sample Output 2

2
8
-15
-1
2

Sample Input 3

-5
3

Sample Output 3

-2
-8
-15
-1
-2

Sample Input 4

-100
-99

Sample Output 4

-199
-1
9900
1
-1