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


int main(){
  int a,b;
  cin >> a >> b;
  int y=(b-a)/2;
  y=-y;
  int x=a-y;
  cout << x << " " << y << endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(ll i=0;i<ll(n);i++)


int main() {
    ll a, b;
    cin >> a >> b;
    cout << (a+b)/2 << ' ' << (a-b)/2 << endl;
    return 0;
}

