#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  while (~scanf("%d %d", &a, &b)) {
    int ans1 = (a < b ? a : b);
    printf("%d %d\n", ans1, (a + b - ans1 - ans1) / 2);
  }
  return 0;
}
