题目:http://poj.grids.cn/practice/2750/
/*2013.06.01
*水题一道,无需说明!
*/
#include <iostream>
using namespace std ;
int main( void ){
int ncase ;
cin >> ncase ;
while( ncase-- ){
int n ;
cin >> n ;
if( n % 2 ){
cout << "0 0" << endl ;
}else{
int surplus = n % 4 ;
int imax = n / 2 ;
int imin ;
if( surplus ){
imin = n / 4 + 1 ;
}else{
imin = n / 4 ;
}
cout << imin << ' ' << imax << endl ;
}
}
return 0 ;
}