#include <iostream>
using namespace std;

int main() {

    // write your code here......
    int a,b;
    cin>>a>>b;
    cout<<a+b<<" ";
    if(a>=b){
        cout<<a-b<<" "<<a*b<<" "<<a/b<<" "<<a%b<<endl;
    }
    else{
        cout<<b-a<<" "<<b*a<<" "<<b/a<<" "<<b%a<<endl;
    }

    return 0;
}