Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 5 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 17 Sep 2017 My Price 9.00

Girl for a date

A Boy asks out a Girl for a date. The Girl told the Boy to get roses for her at that instant. She wants N different kinds of roses but only one of each type. Each rose have several layers of petals. The number of petals in each layer goes on decreasing from outside to inside. Now, the girl will count every petal of all the roses and if total petals of all the roses are odd then she will go with him otherwise she won’t. Help girl to make decision.

Input

First line of input contains a number N total number of test cases.

First line of each test case will contain a number specifying types of roses T.

Each of the following T lines will contain two numbers. First number is difference D and second number is number of petals O in outermost layer.

Output

YES if she goes on date and NO if she does not.

Constraints

  • 1 = N = 20
  • 1 = T = 1000
  • 1 = D = O
  • 1 = O = 1000^5

 

Example

Input: 2 2 1 9 3 8 4 2 4 3 9 1 9 2 7

Output:

NO YES

 

Explaination

Two is the number of test cases.For First Input there are 2 Types of roses 1st Rose has 9 petals at outermost layer and 1 is the difference of petals from outer to inner side and second has 8 petals at outermost layer and 3 is the difference.For second Input there are 4 types of roses and the difference and number of petals of the outer most layer is given for each type of rose respectively.The sum for First 2type does not satisfy the condition of the girl hence output is NO,while the second does hence output is YES.

Answers

(5)
Status NEW Posted 17 Sep 2017 12:09 PM My Price 9.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)