P20992 [HackerEarth] Karan has his B'day today so,he invites his friends,relatives for party.But now the problem arises that number of people in the party has increased.So, now Karan want his B'day cake sho
普及
题目描述

Karan has his B'day today so,he invites his friends,relatives for party.But now the problem arises that number of people in the party has increased.So, now Karan want his B'day cake should be given to all people present in the party keeping in mind that each Special person in party should have 100gm, Best friends should have 50gm, friends should have 25gm amount from the original cake.
So now you have to help Karan and you are given X gm of cake which you have to divide in 3 group(Special person,Best Friends,Friends)
such that each member of the group get the share not less than as state above.If such division is possible than print total ratio of the cake taken by each group, if not print No.

INPUT
Fist line would be T testcase (T<100) followed by T lines which have Quantity of cake in grams(cake ≤ constraints are n ≤ 36000000) and number of people in three groups separated by space

OUTPUT
If the division is possible for all group than print amount of cake only not units taken by each group else print No.
If after giving each member there respective amount of cake, than left over cake is to be given to
Special person
Best Friends
Friends
if and only if every person of group get it.If not Print No,order
of priority given above should be taken in mind.You can give cake to group as
many time as you can,but keeping in mind the given condition.
Consider the test Case
25 1 1 1
so here only friends will have not other you have to print No.
175 1 1 1
here sf =100,bf=50 and f=25 and there sum(100+50+25=175) so you have to print 100 50 25

SAMPLE INPUT
2
1500 8 8 2
500 2 5 7

SAMPLE OUTPUT
800 400 300
No

Explanation

So in 1st case you are given 1500gm of cake and on dividing this in group

Special Person 100*8=800

Best Friends 50*8=400

Friends 25*2=50

and now left with 250 gm of cake so on dividing this Special and Best friends each member will not get the cake so friends get their share of 50 and now leftover is 200 than again check we will left with 150 and repeatedly doing this at last friends share is 300.
2nd Case

Special Person 100*2=200

Best Friends 50*5=250

Friends 25*7=175

which equals to 200+250+175=625
so answer is No

输入格式

见题面

输出格式

见题面

样例输入
100 1500 6 8 2 50415 20 15 7 574 2 8 7 50 2 5 9 540540 3 4 7 8500 2 16 7 1500 2 72 7 5500 2 45 6 5600 3 1 7 5400 2 9 45 1200 8 6 2 9500 2 5 4 45010 4 8 7 5515200 2 5 1 2115200 12 5 7 3500 2 5 7 112500 12 5 7 251200 2 5 74 15300 45 5 7 18500 1 5 7 221500 8 80 2 510415 20 15 7 5274 2 8 7 502 2 5 90 541200 3 4 7 118500 21 16 7 122500 1 7 7 55100 2 01 6 56200 3 1 7 54200 2 4 4 1200 8 6 2 951200 2 51 4 45200 4 84 7 5500 24 54 1 151200 12 5 7 35121020 2 5 7 1500 12 5 7 2500 2 5 47 53100 0 5 7 852101 1 5 74 15050 8 8 2 504215 20 15 7 5744 2 8 7 580 2 5 9 5400 3 4 74 8528400 2 16 7 15500 1 74 7 551500 2 0 6 56010 3 1 74 541200 2 9 4 12010 8 6 2 95020 2 5 44 45020 4 84 7 545500 2 5 1 1521400 12 5 7 35010 2 5 75 155400 12 5 7 25040 2 5 7 535200 5 5 7 85010 1 5 7 15200 8 8 2 50415 20 15 7 5714 2 8 7 510 2 5 9 542100 3 4 7 8500 2 16 7 15010 1 7 7 55010 2 0 6 56020 3 1 71 54020 2 9 4 12020 84 6 2 95010 2 5 4 45200 4 8 7 5520 2 5 1 151200 12 5 7 35020 25 5 7 15020 12 5 7 25020 2 5 7 53200 0 5 7 85200 1 75 7 15010 84 8 2 50415 20 15 7 57214 2 8 7 521210 25 5 9 54020 3 4 7 850210 52 16 7 150210 1 57 7 550210 2 0 6 56020 3 1 7 540210 24 9 4 122100 8 64 2 95010 2 55 4 45010 4 8 7 551200 2 54 1 15200 12 55 7 350210 42 5 7 150120 12 5 7 252100 2 5 7 530210 10 55 7 850120 1 50 7
样例输出
600 800 100 No No No No No No No 3300 550 1750 No 800 300 100 No No 2322200 2902750 290250 No 1200 1250 1050 No No No No 38400 180000 3100 No No No No No 19600 68600 34300 No No 21800 21600 10800 800 300 100 No No 2400 2700 400 No No No No No No 9600 4800 650 No No No No No 1600 11100 2800 No No No No No No 229800 287000 28700 No No 114000 24250 17150 No No No 9600 4800 800 No No No No No No No No No No No 18400 18400 8400 No No No No No No No No No No No No No No No No No 24000 96000 2100 No No 38600 507600 5000 No No No No No No