P14966 [HackerEarth] Maggu is the most brilliant student in his class .He has given some maths assignment by his maths teacher. But, today he has to go to Lissa's Birthday party. Therefore, he can't get enou
普及
题目描述

Maggu is the most brilliant student in his class .He has given some maths assignment by his maths teacher. But, today he has to go to Lissa's Birthday party. Therefore, he can't get enough time to complete his assignment. So, Can you provide him a helping hand. He asked you because you are second most intelligent student from the same class.

Assignment problem:
Given a set of integers containing n elements (A[i] where 1 ≤ i ≤ n) and thereafter T question each containing single integer Z . you need to tell whether it is possible to take any subset from the original set such that sum of the elements in it when XOR'd with Z results in zero.

INPUT:
first line of the input contains a single integer n denoting the number of elements in the set. Next line of input contains n space separated integers denoting elements of set. Next line of input contains a single integer T denoting the number of question.Next T lines contains T integers Z describing each question.(one per line)

OUTPUT:
output consists of T lines each containing either "Yes" or "No" (quotes for clarity) depending upon existence of such subset.

1 ≤ n ≤ 100
1 ≤ A[i] ≤ 1000
1 ≤ T ≤ 1000000
1 ≤ z ≤ 1000000

SAMPLE INPUT
3
1 2 3
5
1
2
3
4
7

SAMPLE OUTPUT
Yes
Yes
Yes
Yes
No

输入格式

见题面

输出格式

见题面

样例输入
50 325 277 186 455 139 199 249 139 119 292 137 373 413 278 327 10 17 415 284 497 349 338 182 290 243 425 263 182 368 199 9 477 326 356 187 4 406 259 443 304 298 326 408 68 65 485 206 158 23 27 1000 49 3886 748 8346 3567 9163 3996 4443 1579 1596 892 6529 2218 353 9109 3411 4140 1772 5333 7457 1364 3149 2875 2690 589 314 8379 8281 9301 5840 4587 4543 6640 5662 2552 244 4344 8009 6393 232 3515 8702 9799 929 512 7270 8481 3586 6070 6667 1215 5232 1261 6246 9825 8699 6276 2090 2768 9590 4865 5156 2150 768 9558 8153 2905 5557 9054 8603 5445 2780 1230 8395 6073 3217 127 4789 1724 7332 9158 1278 3960 7082 285 1705 8956 8824 2830 5848 2832 7909 3824 5906 1734 9900 8731 1604 3261 2741 3852 8708 9454 5133 7965 5971 5341 8802 9355 2012 7867 8404 5763 4857 5384 1196 4032 9127 2906 6167 4988 7810 3559 742 1477 8860 3713 5142 814 1394 507 2251 7281 3706 8186 2322 4006 9512 2331 4906 909 5897 5931 9418 2385 7214 513 9285 9444 3407 8358 236 2913 5879 133 9062 9710 6960 3629 3440 1731 7210 882 3728 688 6155 2134 5734 819 283 9883 3402 9493 8533 8833 4021 6806 2221 7288 3082 5811 3731 2772 3196 7309 9499 2809 1681 2836 8324 8790 5897 4577 4279 3495 9709 2007 3501 2453 3551 3416 611 2786 3160 2523 3755 9817 1229 4492 1144 6791 8445 4984 5778 5403 6499 981 4795 2147 6453 7332 9181 9811 2634 9398 2746 1148 6210 1968 2464 4038 731 4013 202 5245 7035 2124 1098 8394 5208 7549 5311 4915 9997 9421 8912 1083 8931 4359 4743 7037 2904 5314 6989 278 6451 9115 511 6490 7479 9242 1332 8440 5233 8814 5540 351 2603 7739 9424 3880 2776 9868 5655 3329 3211 7347 3496 9155 3340 2444 4817 9168 9472 6205 9946 1908 8775 9375 2810 9854 8511 7283 1381 1044 5745 8892 9603 6053 2669 6629 9791 1752 1557 6854 499 7448 3198 882 3621 5775 4593 3235 7618 5743 8528 9446 6179 46 6392 5887 6048 1005 8677 287 2297 6292 2411 299 3913 8698 5620 6900 8250 5217 7575 8129 8543 467 1191 7266 2164 654 2006 4941 2669 3844 3564 3931 3747 2826 6506 4051 7556 2780 9901 1979 9696 6515 5776 5341 2616 8709 1911 1876 3706 5683 2431 8014 2390 8567 9578 7616 5367 6897 1672 7005 1736 2368 7865 4229 3872 2311 6932 8090 7332 7734 9564 5515 5224 5700 6185 5218 2314 2888 2271 4461 9089 8660 6402 4093 9777 5470 5869 2650 2257 4350 3055 190 6764 2295 4284 9150 2862 8907 4189 3252 8542 2292 9802 5087 2564 8929 9430 3067 6606 7949 9202 5748 9790 1602 9076 9734 2643 7115 8403 2970 1208 5589 7184 9612 2608 8684 6057 9918 1703 3438 9880 3170 6498 9594 5456 581 8849 3 8467 7693 559 6842 2406 5592 500 6027 5990 2089 3794 618 2611 5722 9494 4874 5084 1610 1591 4239 7375 7308 6399 2549 470 1786 5063 222 165 1403 8257 1506 985 2407 5609 6910 7514 175 8128 8514 6482 9800 6229 7377 235 6087 3008 5919 4722 4193 1082 5309 5990 745 7113 8586 2353 3574 3829 8930 1732 1553 4725 9680 3130 7423 2330 4291 4760 4148 6074 1685 3070 5066 6137 926 5828 155 9036 9143 3352 2409 5800 2686 9769 9101 1078 4966 4315 8494 2860 1985 7281 665 8975 234 3976 7042 3561 2760 258 2931 5166 9717 5291 4256 2670 4385 3807 8112 8194 6393 7008 223 3100 4889 3741 4302 7124 782 7906 8808 6470 5677 3669 4444 3422 8361 9362 2796 8388 179 1130 2896 4744 4947 3207 4956 675 1142 8953 3583 8726 9518 3082 6549 4063 2712 899 284 5454 2141 1362 1497 9010 3166 3626 1059 8484 153 4950 624 9902 5350 6372 108 7906 4701 8336 9063 8768 5461 5430 6493 3322 618 6830 9876 3574 4166 7122 154 7930 8006 201 9749 5604 5479 7055 8753 9312 3970 955 3853 3053 2837 8841 7094 9401 2354 9366 1760 389 7960 9180 5259 1148 105 7083 5186 8758 496 225 7852 9226 8444 433 2390 8720 8005 5455 7099 7303 9007 7064 3325 6714 3019 3255 5465 1356 6534 1560 1414 9512 6933 6896 4541 5431 9848 7688 7189 8545 2051 2543 6105 4630 578 1781 822 4159 1630 7683 3794 6939 8633 8182 1967 6279 7337 6660 4273 6228 6869 1738 1616 2687 800 7321 6102 2719 3227 2386 380 5232 7283 4187 1842 3045 6476 7022 8119 2804 5452 2977 2143 6178 1383 4189 9158 8747 7261 985 4301 278 5586 6280 737 3726 7579 3822 8238 9041 1822 1649 6970 4269 6921 8601 9781 7033 156 5967 7600 3553 5578 1354 3465 3045 6634 8915 4753 2590 1387 1421 6534 104 6022 904 7791 5648 6784 5671 139 6015 6880 6689 5041 9138 1503 2009 6940 2673 7717 5134 638 1223 7551 974 3335 2540 3421 8993 1676 6572 8749 2488 2757 6865 8822 2887 7252 465 5050 6353 6962 3575 3802 8938 4984 8649 5006 6359 8608 994 2610 6090 4643 8131 5794 7966 3994 2084 9637 8153 5321 142 4623 9779 7880 1061 7865 8640 5022 3250 503 8610 3899 4423 4151 7820 7571 4409 4731 7751 651 7142 8427 2016 2737 2825 4812 9284 4688 8367 9898 9479 7185 8456 9447 454 2792 1859 176 2160 4556 9973 6899 9673 449 2394 3130 9066 687 5197 2390 1780 186 5226 6874 6845 7671 4585 9634 3678 6443 8027 1534 7498 76 8861 4455 9784 6773 7688 136 4192 5157 6783 8702 2985 3856 3425 2361 3969 1223 3382 6196 9346 7277 3736 2347 6812 6944 5821 1080 6445 5779 9950 8371 6313 3122 6194 3557 4346 9621 9052 1326 3952 5348 8118 7068 4271 5182 6894 8670 61 868 3635 8043 822 580 9033 9988 6026 9932 5770 8486 9837 77 3399 1235 8246 6311 8920 6884 7809 9038 2330 3352 4547 6418 3284 3570 1321 7542 6000 3135 2510 357 1077 2111 9737 7627 7244 6838 8128 1739 7537 2928 249 5786 626 4389 9757
样例输出
Yes Yes Yes Yes No Yes Yes Yes Yes Yes