#include <bits/stdc++.h>
using namespace std;
int T, n, x, y;
int ans1, ans2;
int main() {
  scanf("%d", &T);
  while (T--) {
    ans1 = ans2 = 0;
    scanf("%d%d%d", &n, &x, &y);
    int goal = x + y;
    if (goal > n)
      ans1 = min(n, goal - n) + (x != n || y != n);
    else
      ans1 = 1;
    ans2 = min(goal - 1, n);
    printf("%d %d\n", ans1, ans2);
  }
}
