//============================================================================
// Name : POJ_2309.cpp
// Author : tiger
// Version :
// Copyright : 类似树状数组的原理
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
int lowbits(int n)
{
return n&(-n);
}
int main() {
//freopen("in","r",stdin);
int t,n;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
printf("%d %d/n",n-lowbits(n)+1,n+lowbits(n)-1);
}
return 0;
}