#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  int x, y, z;
  cin >> a >> b;
  if (a >= b) {
    c = b;
    a = a - b;
    z = a / 2;
    cout << c << " " << z;
    return 0;
  }
  c = a;
  b = b - a;
  z = b / 2;
  cout << c << " " << z;
  return 0;
}
