#include <bits/stdc++.h>
using namespace std;
int main() {
  int p;
  cin >> p;
  for (int k = 1; k <= p; k++) {
    int n, x, y;
    cin >> n >> x >> y;
    int a, b, c, d;
    a = n - x;
    b = x - 1;
    c = n - y;
    d = y - 1;
    int count = 0;
    if (a > d) {
      count += d;
      a -= d;
    } else if (a * d != 0) {
      count += a - 1;
      a = 1;
    }
    if (c > b) {
      count += b;
      c -= b;
    } else if (c * b != 0) {
      count += c - 1;
      c = 1;
    }
    if (a <= c)
      count += a;
    else
      count += c;
    cout << n - count << " ";
    a = n - x;
    b = x - 1;
    c = n - y;
    d = y - 1;
    count = 0;
    if (d > a) {
      d -= a;
      count += a;
    } else if (a * d != 0) {
      count += d;
      d = 0;
    }
    if (b > c) {
      b -= c;
      count += c;
    } else if (b * c != 0) {
      count += b;
      b = 0;
    }
    if (b <= d)
      count += b;
    else
      count += d;
    cout << count + 1 << endl;
  }
}
