#include <bits/stdc++.h>
using namespace std;
void maloosh_lazma() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  maloosh_lazma();
  long x, y, maxx, minn;
  cin >> x >> y;
  if (x == y) {
    cout << x << " " << 0;
    return 0;
  }
  maxx = max(x, y);
  minn = min(x, y);
  cout << minn << " " << (maxx - minn) / 2;
  return 0;
}
