#include <stdio.h>
#include <cstdlib>
void update(int *a,int *b) {
int sum_result = *a + *b;
int minus_result = *a - *b;
*a = sum_result;
*b = abs(minus_result);
}
int main() {
int a, b;
int *pa = &a, *pb = &b;
scanf("%d %d", &a, &b);
update(pa, pb);
printf("%d\n%d", a, b);
return 0;
}