#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
void add(long long int &a, long long int b) {
  a += b;
  if (a >= 1000000007) a %= 1000000007;
}
void subtract(long long int &a, long long int b) {
  a -= (b - 1000000007);
  if (a >= 1000000007) a -= 1000000007;
}
long long int multiply(long long int a, long long int b) {
  long long int res = a;
  res *= b;
  if (res >= 1000000007) res %= 1000000007;
  return res;
}
void solve() {
  long long int n, x, y;
  cin >> n >> x >> y;
  long long int max_pairs = min(n, x + y - 1ll);
  long long int min_sum = x + y + 1;
  long long int level = min(min_sum, n);
  if (n + (n - 1) < min_sum) {
    cout << n << " " << max_pairs << "\n";
    return;
  }
  long long int pairs = (level - 1);
  long long int rest = max(0ll, n - level);
  pairs += (rest);
  cout << n - pairs + max(0ll, x + y - n) << " " << max_pairs << "\n";
}
int32_t main() {
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
