#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll dmod = 1e9 + 7;
ll fpow(ll a, ll b, ll mod) {
  ll x = 1;
  while (b != 0) {
    if (b & 1) {
      x *= a;
      x %= mod;
    }
    a = a * a;
    a %= mod;
    b >>= 1;
  }
  return x;
}
void solve() {
  ll a, b, c;
  cin >> a >> b;
  c = min(a, b);
  cout << c << ' ';
  if (a == c) {
    cout << (b - c) / 2 << "\n";
  } else {
    cout << (a - c) / 2 << "\n";
  }
}
int main() {
  ll t = 1;
  while (t--) {
    solve();
  }
}
