Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: The Gossiping System
Description A common amusement in almost any society, though certainly not the most glamorous one, is for its inhabitants to spread rumours about each other. In the town of Knoxville, this is definitely known to be the case. In order to establish some sort of order without completely ruin the pleasure of gossiping, they have agreed on a system for everyday life activities, in which rumours spread in a controlled fashion. The inhabitants meet in certain groups in their work, as well as in their spare time, on a daily basis. The following three criteria are met for their system: - Each group must have the same non-zero number of members m.
- Each person must belong to the same number of groups r, as any other person.
- Each pair of different groups has exactly one member in common.
As a mathematician living in Knoxville, you are interested in studying the existence conditions for these systems for large values of n. However, you soon realise the complexity of these combinatorial objects, and choose to study only their simplest non-trivial class, the (n,g,m,2)-gossiping systems. Input On the first line of input, is a single positive integer t. Thereafter t test cases follow. Each test case consists of one positive number n, 1 <= n <= 10 ^{50}, given in the standard base 10 representation, where n specifies the number of persons.Output For each test case in the input, output the text 'Yes.' on a line of its own, if there exists a (n,g,m,2)-gossiping system for any positive integers g>1 and m>0 for the value of n in the test case, otherwise output the text 'No.' Sample Input 5 3 4 5 6 678678658335615 Sample Output Yes. No. No. Yes. Yes. Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator