#include <iostream>
using namespace std;
int main() {
// write your code here......
int a,b;
cin >> a >> b;
if(a < b) {
int tmp = a;
a = b;
b = tmp;
}
cout << a+b << " " << a-b << " " << a*b << " " << a/b <<" " << a%b;
return 0;
}