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