P17777 [HackerEarth] On a shiny day, kindergarten kids are going to the picnic. All the kids bought some candies with them. As all of them bought different number of candies, soon quarrel started among them.
普及
题目描述

On a shiny day, kindergarten kids are going to the picnic. All the kids bought some candies with them. As all of them bought different number of candies, soon quarrel started among them. Teacher decided to collect all the candies. Soon a huge heap of candies is created on the table. Teacher now decided to give equal number of candies to all, but wait. Shinchan was a curious boy, he wants know whether it is possible to do so or not? And after equal distribution how many candies does teacher will have from the remaining candies?

INPUT:
Line 1: number of test cases. T.
Line 2: in each T line you are given number of kids N.
Line 3: space separated number of candies each kid have, i.e. X.

OUTPUT
Line 1: if it is possible print “YES” , if it not possible to divide candies print “NO”.
Line 2: space separated two numbers, number of candies each kid get and candies teacher get.

CONSTRAINTS:
1 ≤ T ≤ 10;
2 ≤ N ≤ 1000;
1 ≤ X ≤ 10^10;

SAMPLE INPUT
2
4
10 12 14 8

5
2 3 5 12 2

SAMPLE OUTPUT
YES
11 0
NO
4 4

Explanation

In Case 1:
total candies = 44
each student will get 11 candies , and teacher will get 0, so ans is YES

输入格式

见题面

输出格式

见题面

样例输入
3 10 20 13 24 56 23 290 12 13 11 900 5 90 90 90 90 90 3 1000 100000 20
样例输出
NO 1174297336 84 NO 1086535385 78 NO 1120059728 25 NO 1047709069 22 NO 1006744067 17 NO 1260596013 45 NO 1066968932 98 NO 1038497036 38 NO 1057526039 6 NO 1052977765 82 NO 1072302722 33 NO 1022965107 7 NO 1075736158 65 NO 1014119172 33 NO 1030919275 85 NO 1091899070 11 NO 1162955724 30 NO 1079307126 78 NO 1085202926 96 NO 1016478037 35 NO 1064108485 79 NO 1001614838 4 NO 1151329855 44 NO 1047662947 32 NO 1132975929 25 NO 1106044053 73 NO 1050857718 7 NO 1004592552 14 NO 963050840 79 NO 1143292847 21 NO 1024643345 94 NO 1203515641 2 NO 1029457302 69 NO 969071023 96 NO 1152327832 82 NO 1112892931 77 NO 1076132294 10 NO 964244913 47 NO 1193503266 82 NO 1061011366 61 NO 1031534979 80 NO 1075490018 72 NO 1004407271 14 NO 1119945259 36 NO 1018309459 91 NO 1147595723 17 NO 1136477391 25 NO 1023898148 35 NO 949464894 20 NO 1067312609 1 NO 1090571435 42 NO 1167815419 28 NO 1100413152 33 NO 1156601811 26 NO 1026087930 71 NO 1153273264 75 NO 1009155708 16 NO 1107553491 42 NO 1095597869 95 NO 1044175241 3 NO 962155637 55 NO 1037054506 3 NO 1031607979 1 NO 994441064 37 NO 1037565925 89 NO 1015742981 49 NO 1040709576 89 NO 1042878361 31 NO 1121730704 25 NO 1097636960 7 NO 1078316543 51 NO 1053723901 41 NO 1216428721 79 NO 999848117 75 NO 1021559452 56 NO 1056595934 97 NO 1067704306 72 NO 1126201534 52 NO 1093961714 7 NO 1152817607 81 NO 1011437830 40 NO 1108990016 40 NO 1053538217 83 NO 1125553163 54 NO 1028131656 70 NO 994570615 71 NO 988734011 72 NO 1086268931 87 NO 1033266391 20 NO 1004546664 66 NO 1088591751 68 NO 1069523791 2 NO 1107440248 15 NO 1089274004 33 NO 998249431 71 NO 942833710 1 NO 1033600711 30 NO 1083086311 33 NO 1085565590 15 YES 10000000000 0