import java.io.*;
import java.util.*;


class SnakePath {
   
    public SnakePath() {
    }

    public String head(int time) {
	int row = 0,col=0;

	/* a completer */

	return row+","+col;
    }

}

class Snake {

    public static void main(String[] args) {
	Locale.setDefault(Locale.ENGLISH);

	try {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String line = "";
	    
	    line = br.readLine();
	    
	    int nb = Integer.parseInt(line);
	    SnakePath snake = new SnakePath();
	    
	    for(int i=0;i<nb;i++) {
		line = br.readLine();
		int t = Integer.parseInt(line);
		System.out.println(snake.head(t));
	    }
	}
	catch(IOException e) {}
    }
}
