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