#include <bits/stdc++.h>
using namespace std;
int n;
int m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long n, x, y;
    cin >> n >> x >> y;
    if (x > y) swap(x, y);
    long long a = x - 1;
    long long b = n - y;
    cout << min(n, max(0ll, a + 1 - b) + 1) << " " << n - max(0ll, b - a)
         << "\n";
  }
  return 0;
}
