#include <iostream>
using namespace std;

int main() {

    int x,y;
    cin>>x>>y;
    if(x<y){
        swap(x,y);
    }
    cout<<x+y<<" "<<x-y<<" "<<x*y<<" "<<x/y<<" "<<x%y;
    return 0;
}