#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 7;
const int M = 1e6 + 7;
const int lim = 2e6;
const int P = 998244353;
const int inf = 0x3f3f3f3f;
int a[N], ans, n, m, x, y;
bool vis[N];
vector<int> vt[N];
int main() {
  scanf("%d%d", &x, &y);
  if (x > y) swap(x, y);
  printf("%d %d\n", x, (y - x) / 2);
  return 0;
}
