SP7946 HS10RMSY - Check Ramsey

Description

From Ramsey theorem we know that for every _k, l_ pair there exists an integer: _R_(_k, l_) for that if _n >= R_(_k, l_), then if you color the edges of a complete graph on _n_ vertices with red and blue then it contains a complete subgraph on _k_ vertices whose edges are blue or a complete subgraph on _l_ vertices whose edges are red. To get an impression of the theorem you have to count the number of complete subgraphs having _k_ nodes with blue edges - _K_(_k_) and the number of complete subgraphs having _l_ nodes with red edges - _K_(_l_) for each edge coloring. To make the problem somewhat easier (or harder?) for each test the probability that an edge is red (or blue) is close to 1/2. This means that on _n_ vertices you will see about _n_(_n_-1)/4 red edges.

Input Format

The first line contains the number of test cases _T_, where _T_

Output Format

For each test print the case number then the count of blue _K_(_k_) and red _K_(_l_) for the edge coloring.