#include <bits/stdc++.h>
using namespace std;

int main() {
	int t;
	cin>>t;
	while(t--)
	{
	        long long x;
	        cin>>x;
	        cout<<x<<" "<<0<<"\n";
	}
	return 0;
}