#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <class T, class U>
void mod_partial_sum(const T& v, U* out, ll mod) {
  auto it = begin(v);
  ll val = 0;
  for (auto& x : *out) x = (val += *(it++)) %= mod;
}
int main() {
  cout << fixed << setprecision(10);
  int a, b;
  int rest;
  cin >> a >> b;
  if (a > b) {
    cout << b;
    rest = a - b;
  } else {
    cout << a;
    rest = b - a;
  }
  cout << " ";
  cout << rest / 2 << endl;
  return 0;
}
