#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, sum = 0, sum2 = 0;
  cin >> a >> b;
  if (a >= b) {
    sum = b;
    a = a - b;
    if (a % 2 == 0 && a / 2 != 0)
      sum2 = a / 2;
    else
      sum2 = a / 2;
  } else if (a <= b) {
    sum = a;
    a = b - a;
    if (a % 2 == 0 && a / 2 != 0)
      sum2 = a / 2;
    else
      sum2 = a / 2;
  }
  cout << sum << ' ' << sum2 << endl;
  return 0;
}
