#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for(int i = a; i < b; i++)
int A, B;
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> A >> B;
    for(int i = -100; i <= 100; i++) {
        for(int j = -100; j <= 100; j++) {
            if((i + j == A) && (i - j == B)) {
                cout << i << " " << j << endl;
            }
        }
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;


int main() {
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */   
    int a, b;
    cin >> a >> b;
    cout << ((a+b) >> 1) << " " << ((a-b) >> 1);
    return 0;
}
