#include <iostream>
using namespace std;
int main() {
// write your code here......
int a,b;
cin>>a>>b;
//先判断出大小值
int max=a>b ? a:b;
int min=a>b ? b:a;
int x1=max+min;
int x2=max-min;
int x3=max*min;
int x4=max/min;
int x5=max%min;
printf("%d %d %d %d %d",x1,x2,x3,x4,x5);
return 0;
}