#
# We consider N (N<=1000) types of banknotes, of different values,
# of each there being an unlimited number of pieces. Determine a payment
# method of payment, of value S using a minimum numbers of banknotes.
#
# Input:
# N = 5
# S = 100
# 3,15,1,5,2
#
# Output: 6 * 15
# 2 * 5
def fn():
def sorting(sign):
n = len(B)
for i in range(1, n):
j = i - 1
aux = B[i]
while j >= 0 and B[j]*sign>aux*sign:
B[j+1] = B[j]
j-=1
B[j+1] = aux
def solve():
global S
sorting(-1)
for i in B:
if S>=i:
print("%d * %d"%(S//i,i))
S-=(S//i)*i
if S == 0:
break
if S>0:
print("No Solution")
global S
N = int(input("N="))
S = int(input("S="))
B = [0]*(N)
for i in range(0, N):
B[i] = int(input())
solve()
fn()
IwojIFdlIGNvbnNpZGVyIE4gKE48PTEwMDApIHR5cGVzIG9mIGJhbmtub3Rlcywgb2YgZGlmZmVyZW50IHZhbHVlcywKIyBvZiBlYWNoIHRoZXJlIGJlaW5nIGFuIHVubGltaXRlZCBudW1iZXIgb2YgcGllY2VzLiBEZXRlcm1pbmUgYSBwYXltZW50CiMgbWV0aG9kIG9mIHBheW1lbnQsIG9mIHZhbHVlIFMgdXNpbmcgYSBtaW5pbXVtIG51bWJlcnMgb2YgYmFua25vdGVzLgojCiMgSW5wdXQ6CiMgTiA9IDUKIyBTID0gMTAwCiMgICAgICAgICAzLDE1LDEsNSwyCiMKIyBPdXRwdXQ6IDYgKiAxNQojICAgICAgICAgMiAqIDUKCmRlZiBmbigpOgogICAgZGVmIHNvcnRpbmcoc2lnbik6CiAgICAgICAgbiA9IGxlbihCKQogICAgICAgIGZvciBpIGluIHJhbmdlKDEsIG4pOgogICAgICAgICAgICBqID0gaSAtIDEKICAgICAgICAgICAgYXV4ID0gQltpXQogICAgICAgICAgICB3aGlsZSBqID49IDAgYW5kIEJbal0qc2lnbj5hdXgqc2lnbjoKICAgICAgICAgICAgICAgIEJbaisxXSA9IEJbal0KICAgICAgICAgICAgICAgIGotPTEKICAgICAgICAgICAgQltqKzFdID0gYXV4CgogICAgZGVmIHNvbHZlKCk6CiAgICAgICAgZ2xvYmFsIFMKICAgICAgICBzb3J0aW5nKC0xKQogICAgICAgIGZvciBpIGluIEI6CiAgICAgICAgICAgIGlmIFM+PWk6CiAgICAgICAgICAgICAgIHByaW50KCIlZCAqICVkIiUoUy8vaSxpKSkKICAgICAgICAgICAgUy09KFMvL2kpKmkKICAgICAgICAgICAgaWYgUyA9PSAwOgogICAgICAgICAgICAgICAgYnJlYWsKICAgICAgICBpZiBTPjA6CiAgICAgICAgICAgIHByaW50KCJObyBTb2x1dGlvbiIpCiAgICBnbG9iYWwgUwogICAgTiA9IGludChpbnB1dCgiTj0iKSkKICAgIFMgPSBpbnQoaW5wdXQoIlM9IikpCiAgICBCID0gWzBdKihOKQogICAgZm9yIGkgaW4gcmFuZ2UoMCwgTik6CiAgICAgICAgQltpXSA9IGludChpbnB1dCgpKQogICAgc29sdmUoKQpmbigpCg==