#include <bits/stdc++.h>
int main() {
  int red, blue, MinS, MaxS, sobra;
  scanf("%d %d", &red, &blue);
  if (red > blue) {
    MinS = blue;
    MaxS = red;
  } else if (red < blue) {
    MinS = red;
    MaxS = blue;
  } else if (red == blue) {
    printf("%d 0", red);
    exit(0);
  }
  printf("%d ", MinS);
  sobra = MaxS - MinS;
  if (sobra % 2 == 0 || sobra % 2 == 1) {
    printf("%d", sobra / 2);
  } else {
    printf("0");
  }
  return 0;
}
