#include <stdio.h>
void cal(int x, int y, int *sum, int *diff, int *mul, int *mod);
int main() {
int x,y,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;
*diff=(x>y)?(x-y):(y-x);
*mul = x * y;
*mod = x / y;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIGNhbChpbnQgeCwgaW50IHksIGludCAqc3VtLCBpbnQgKmRpZmYsIGludCAqbXVsLCBpbnQgKm1vZCk7CgppbnQgbWFpbigpIHsKICAgIGludCB4LHksc3VtLCBkaWZmLCBtdWwsIG1vZDsKICAgICBzY2FuZigiJWQiLCAmeCk7cHJpbnRmKCJ4OiIpOwogICAgIHNjYW5mKCIlZCIsICZ5KTtwcmludGYoInk6Iik7CgogICAgY2FsKHgsIHksICZzdW0sICZkaWZmLCAmbXVsLCAmbW9kKTsKCiAgICBwcmludGYoIlN1bTogJWRcbiIsIHN1bSk7CiAgICBwcmludGYoImRpZmY6ICVkXG4iLCBkaWZmKTsKICAgIHByaW50ZigibXVsOiAlZFxuIiwgbXVsKTsKICAgIHByaW50ZigibW9kOiAlZFxuIiwgbW9kKTsKCiAgICByZXR1cm4gMDsKfQoKdm9pZCBjYWwoaW50IHgsIGludCB5LCBpbnQgKnN1bSwgaW50ICpkaWZmLCBpbnQgKm11bCwgaW50ICptb2QpIHsKICAgICpzdW0gPSB4ICsgeTsKICAgICpkaWZmPSh4PnkpPyh4LXkpOih5LXgpOwogICAgKm11bCA9IHggKiB5OwogICAgKm1vZCA9IHggLyB5Owp9Cg==