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

int main() {
    int a,b;
    cin>>a>>b;
    for(int x=-100;x<=100;x++){
        for(int y=-100;y<=100;y++){
            if(x+y==a and x-y==b){
                cout<<x<<" "<<y<<endl;
                break;
            }
        }
    }

}
#include<iostream>
#include<vector>
#include<bits/stdc++.h>
#define lli long long int
#define mod 1000000007
#define pb push_back
#define mk make_pair
using namespace std;

int main()
{
	int a,b;
	cin>>a>>b;
	cout<<(a+b)/2<<" "<<(a-b)/2<<"\n";
	return 0;
}
