#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
void solve() {
  long long int n, x, y;
  cin >> n >> x >> y;
  long long int min_rank, max_rank;
  if (x - 1 <= n - y || y - 1 <= n - x) {
    max_rank = min(x - 1, n - y) + min(y - 1, n - x);
  } else {
    max_rank = n - x + n - y + min(x - 1 - n + y, y - 1 - n + x);
  }
  if (x - 1 <= n - y - 1 && y - 1 <= n - x - 1) {
    min_rank = 0;
  } else {
    min_rank = x + y - n;
    if (x == y && x == n) min_rank--;
  }
  cout << min_rank + 1 << ' ' << max_rank + 1 << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int TC;
  cin >> TC;
  for (int t = 0; t < TC; t++) solve();
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
