#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;
*mod = x / y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCwgaW50IHksIGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCk7CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgeCwgeTsKICAgIGludCBzdW0sIGRpZmYsIG11bCwgbW9kOwogICAKICAgIHNjYW5mKCIlZCIsICZ4KTsKICAgIHNjYW5mKCIlZCIsICZ5KTsKCiAgICBjYWwoeCwgeSwgJnN1bSwgJmRpZmYsICZtdWwsICZtb2QpOwoKICAgIHByaW50Zigi5ZKMPSVkXG4iLCBzdW0pOwogICAgcHJpbnRmKCLlt649JWRcbiIsIGRpZmYpOwogICAgcHJpbnRmKCLnqY09JWRcbiIsIG11bCk7CiAgICBwcmludGYoIuWVhj0lZFxuIiwgbW9kKTsKCiAgICByZXR1cm4gMDsKfQoKdm9pZCBjYWwoaW50IHgsIGludCB5LCBpbnQgKnN1bSwgaW50ICpkaWZmLCBpbnQgKm11bCwgaW50ICptb2QpewoKICAgICpzdW0gPSB4ICsgeTsKCiAgICBpZih4ID4geSl7CiAgICAgICAgKmRpZmYgPSB4IC0geTsKICAgIH0gZWxzZSB7CiAgICAgICAgKmRpZmYgPSB5IC0geDsKICAgIH0KCiAgICAqbXVsID0geCAqIHk7CiAgICAqbW9kID0geCAvIHk7Cn0K