#include <iostream>

using namespace std;

int main() {
    int num_cases, unused, digit;
    cin >> num_cases;
    for (int i = 0; i < num_cases; i++) {
        cin >> unused >> digit;
        cout << digit << " 5\n";
    }
}