#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int ans = 0;
  int a, b;
  cin >> a >> b;
  if (a < b) swap(a, b);
  cout << b << " " << (a - b) / 2 << endl;
  return 0;
}
