#include <stdio.h>
void cal(int x,int y,int *sum,int*diff,int*mul,int*mod);
int main(void) {
int x,y;
int sum,diff,mul,mod;
cal(x,y,&sum,&diff,&mul,&mod);
return 0;
}
void cal(int x,int y,int*sum,int*diff,int*mul,int*mod)
{
*sum=x+y;
if(x>=y){
*diff=x-y;
}else{
*diff=y-x;
}
*mul=x*y;
if(y!=0){
*mod=x%y;
}else{
*mod=0;
}
}
I2luY2x1ZGUgPHN0ZGlvLmg+CnZvaWQgY2FsKGludCB4LGludCB5LGludCAqc3VtLGludCpkaWZmLGludCptdWwsaW50Km1vZCk7CmludCBtYWluKHZvaWQpIHsKCWludCB4LHk7CiAgICBpbnQgc3VtLGRpZmYsbXVsLG1vZDsKICAgIHNjYW5mKCIlZCVkIiwmeCwmeSk7CiAgICBjYWwoeCx5LCZzdW0sJmRpZmYsJm11bCwmbW9kKTsKICAgIHByaW50ZigieD0lZCx5PSVkXG4iLHgseSk7CiAgICBwcmludGYoInN1bTolZFxuIixzdW0pOwogICAgcHJpbnRmKCJkaWZmOiVkXG4iLGRpZmYpOwogICAgcHJpbnRmKCJtdWw6JWRcbiIsbXVsKTsKICAgIHByaW50ZigibW9kOiVkXG4iLG1vZCk7CiAgICByZXR1cm4gMDsKfQp2b2lkIGNhbChpbnQgeCxpbnQgeSxpbnQqc3VtLGludCpkaWZmLGludCptdWwsaW50Km1vZCkKewogICAgKnN1bT14K3k7CgogICAgaWYoeD49eSl7CiAgICAgICAgKmRpZmY9eC15OwogICAgfWVsc2V7CiAgICAgICAgKmRpZmY9eS14OwogICAgfQogICAgKm11bD14Knk7CiAgICBpZih5IT0wKXsKICAgICAgICAqbW9kPXgleTsKICAgIH1lbHNlewogICAgICAgICptb2Q9MDsKICAgIH0KfQo=