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