#include <bits/stdc++.h>
int main() {
  int a, b;
  scanf("%d%d", &a, &b);
  if (a > b) {
    int total = a - b;
    if (total > 1) {
      total = total / 2;
    } else {
      total = 0;
    }
    printf("%d %d", b, total);
  } else if (a < b) {
    int total = b - a;
    if (total > 1) {
      total = total / 2;
    } else {
      total = 0;
    }
    printf("%d %d", a, total);
  } else {
    printf("%d 0", a);
  }
  return 0;
}
