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