A thief made his way to a shop.

As usual he has his lucky knapsack with him. The knapsack can contain *k* objects. There are *n* kinds of products in the shop and an infinite number of products of each kind. The cost of one product of kind *i* is *a*<sub class="lower-index">*i*</sub>.

The thief is greedy, so he will take exactly *k* products (it's possible for some kinds to take several products of that kind).

Find all the possible total costs of products the thief can nick into his knapsack.
The first line contains two integers *n* and *k* (1 ≤ *n*, *k* ≤ 1000) — the number of kinds of products and the number of products the thief will take.

The second line contains *n* integers *a*<sub class="lower-index">*i*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 1000) — the costs of products for kinds from 1 to *n*.
none
3 2
1 2 3
2 3 4 5 6
5 5
1 1 1 1 1
5
3 3
3 5 11
9 11 13 15 17 19 21 25 27 33
10 3
3 4 12 5 7 13 5 6 1 6
3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 36 37 38 39
10 3
1 2 3 4 5 6 7 8 9 10
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
10 1000
630 764 679 16 34 691 778 366 982 30
16000 16014 16018 16028 16032 16036 16042 16046 16050 16054 16056 16060 16064 16068 16070 16072 16074 16078 16082 16084 16086 16088 16090 16092 16096 16098 16100 16102 16104 16106 16108 16110 16112 16114 16116 16118 16120 16122 16124 16126 16128 16130 16132 16134 16136 16138 16140 16142 16144 16146 16148 16150 16152 16154 16156 16158 16160 16162 16164 16166 16168 16170 16172 16174 16176 16178 16180 16182 16184 16186 16188 16190 16192 16194 16196 16198 16200 16202 16204 16206 16208 16210 16212 16214 16216 1...
3 1000
674 751 563
563000 563111 563188 563222 563299 563333 563376 563410 563444 563487 563521 563555 563564 563598 563632 563666 563675 563709 563743 563752 563777 563786 563820 563854 563863 563888 563897 563931 563940 563965 563974 563999 564008 564042 564051 564076 564085 564110 564119 564128 564153 564162 564187 564196 564221 564230 564239 564264 564273 564298 564307 564316 564332 564341 564350 564375 564384 564409 564418 564427 564443 564452 564461 564486 564495 564504 564520 564529 564538 564554 564563 564572 564597 ...
13 1000
494 391 821 980 716 237 801 893 765 946 338 656 698
237000 237101 237154 237202 237255 237257 237303 237308 237356 237358 237404 237409 237411 237419 237457 237459 237461 237462 237479 237505 237510 237512 237514 237520 237528 237558 237560 237562 237563 237564 237565 237573 237580 237584 237606 237611 237613 237615 237616 237621 237629 237633 237656 237659 237661 237663 237664 237665 237666 237668 237674 237676 237681 237682 237685 237707 237709 237712 237714 237716 237717 237718 237719 237722 237727 237730 237734 237736 237738 237743 237757 237760 237762 ...
4 973
40 32 21 21
20433 20444 20452 20455 20463 20466 20471 20474 20477 20482 20485 20488 20490 20493 20496 20499 20501 20504 20507 20509 20510 20512 20515 20518 20520 20521 20523 20526 20528 20529 20531 20532 20534 20537 20539 20540 20542 20543 20545 20547 20548 20550 20551 20553 20554 20556 20558 20559 20561 20562 20564 20565 20566 20567 20569 20570 20572 20573 20575 20576 20577 20578 20580 20581 20583 20584 20585 20586 20587 20588 20589 20591 20592 20594 20595 20596 20597 20598 20599 20600 20602 20603 20604 20605 20606 2...
100 100
6 7 100 8 5 61 5 75 59 65 51 47 83 37 34 54 87 46 4 26 21 87 12 97 86 68 60 11 62 76 14 83 29 31 91 62 57 80 47 75 85 97 62 77 91 86 14 25 48 77 83 65 39 61 78 77 45 46 90 74 100 91 86 98 55 5 84 42 91 69 100 4 74 98 60 37 75 44 41 12 15 34 36 1 99 16 7 87 36 26 79 42 41 84 17 98 72 16 38 55
100 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229...
50 50
27 4 35 30 19 8 26 22 18 35 32 9 15 27 33 5 9 29 33 24 49 39 16 22 49 2 50 22 19 23 30 50 17 3 24 42 39 5 10 28 46 46 50 11 3 26 7 17 22 18
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227...
25 25
6 3 16 25 2 25 17 11 24 1 1 13 9 16 6 20 21 9 17 16 23 4 9 23 9
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 17...
8 75
1 2 500 482 470 453 434 426
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 ...
8 61
1 2 482 475 471 480 460 450
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 58...
41 1000
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940
900000 900001 900002 900003 900004 900005 900006 900007 900008 900009 900010 900011 900012 900013 900014 900015 900016 900017 900018 900019 900020 900021 900022 900023 900024 900025 900026 900027 900028 900029 900030 900031 900032 900033 900034 900035 900036 900037 900038 900039 900040 900041 900042 900043 900044 900045 900046 900047 900048 900049 900050 900051 900052 900053 900054 900055 900056 900057 900058 900059 900060 900061 900062 900063 900064 900065 900066 900067 900068 900069 900070 900071 900072 ...
8 73
1 2 492 477 464 499 461 429
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 56...
n=int(input())
k=int(input())
f=[]
a=[0]
for i in range(1,n+1):
	p=int(input());
	a.append(p)
a.sort()
for i in range(2,n+1):
	a[i]-=a[1]
for i in range(0,1000006):
	f.append(0)
for i in range(2,n+1):
	for j in range(a[i],a[n]*k+1):
		f[j]=min(f[j],f[j-a[i]]+1)
for i in range(0,a[n]*k+1):
	if f[i]<=k :
		print(a[1]*k+i)