#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  cout << min(a, b) << " ";
  int var = max(a, b) - min(a, b);
  cout << max(var / 2, 0) << endl;
  return 0;
}
