#include<bits/stdc++.h>
#define rep(i,a,b) for (register int i=(a);i<=(b);++i)
#define req(i,a,b) for (register int i=(a);i>=(b);--i)
using namespace std;
int a,b;
int main()
{
    cin>>a>>b;
    cout<<(a+b>>1)<<' '<<(a-b>>1)<<endl;
    return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
   ios_base::sync_with_stdio(false);
   cin.tie(NULL);
   cout.tie(NULL);
  	int a,b;
  	cin>>a>>b;
  	ll x=(a+b)/2,y=(a-b)/2;
  	cout<<x<<" "<<y;
}