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