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