#include <iostream>
using namespace std;

int main() {

    int a, b;
    cin>>a>>b;
    
    if(a>b)//直接连续输出就行,注意空格
    cout<<a+b<<" "<<a-b<<" "<<a*b<<" "<<a/b<<" "<<a%b;
    else
    cout<<a+b<<" "<<b-a<<" "<<a*b<<" "<<b/a<<" "<<b%a;   

    return 0;
}