#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int a, b;
  cin >> a >> b;
  cout << min(a, b) << " ";
  cout << (max(a, b) - min(a, b)) / 2;
}
