#include <bits/stdc++.h>
#pragma GCC optmize("03")
using namespace std;
const int INF = 1e9 + 10;
const long long LLINF = 1e18 + 10;
void solve() {
  int a, b;
  cin >> a >> b;
  cout << min(a, b) << " ";
  cout << (max(a, b) - min(a, b)) / 2;
  return;
}
int main() {
  ios::sync_with_stdio();
  cin.tie();
  cout.tie();
  solve();
}
