Problem: Petya sometimes has to water his field. To water the field, Petya needs a tank with exactly V ml of water.

Petya has got N tanks, i-th of them initially containing ai ml of water. The tanks are really large, any of them can contain any amount of water (no matter how large this amount is).

Also Petya has got a scoop that can contain up to K ml of water (initially the scoop is empty). This scoop can be used to get some water from some tank, and after that pour it all into some tank (it is impossible to get water from multiple tanks without pouring it, or leave some water in the scoop when pouring it). When Petya tries to get some water from a tank, he gets min(v, K) water, where v is the current volume of water in the tank.

Is it possible to obtain a tank with exactly V ml of water using these operations? If it is possible, print a sequence of operations that allows to do it. If there are multiple ways to obtain needed amount of water in some tank, print any of them.

Input

The first line contains 3 integers: N (2 ≤ N ≤ 5000), K (1 ≤ K ≤ 5000), and V (0 ≤ V ≤ 109) — the number of tanks, the maximum volume of water the scoop can contain, and the required amount of water in some tank, respectively.

The second line contains N integers ai (0 ≤ ai ≤ 105), where ai is initial volume of water in i-th tank.

Output

If it is impossible to obtain a tank with exactly V ml of water, print NO. 

Otherwise print YES in the first line, and beginning from the second line, print the sequence of operations in the following format: 

Each line has to contain 3 numbers denoting a compressed operation: "cnt x y" (1 ≤ cnt ≤ 109, 1 ≤ x, y ≤ N), where x is the index of the tank where we get water, y is the index of the tank where we pour water, and cnt is the number of times we transfer water from tank x to tank y. 

The number of these lines must not exceed N + 5.

Examples

Input

2 3 5
2 3


Output

YES
1 2 1


Input

2 3 4
2 3


Output

NO


Input

5 2 0
1 3 5 7 9


Output

YES
2 2 1
3 3 1
4 4 1
5 5 1

Solution (in PYTHON):

Solution:
import sys
input = raw_input
range = xrange

n,K,V = [int(x) for x in input().split()]
    



A = [int(x) for x in input().split()]
Acop = A[:]

if (V%K)==0:
    asum = sum(A)
    if asum>=V:
        print 'YES'
        for i in range(1,n):
            A[0] += A[i]
            count = (A[i]+K-1)//K
            if count>0:
                print count,i+1,1
            A[i] = 0
        if V!=0:
            print V//K,1,2
        sys.exit()
    else:
        print 'NO'
        sys.exit()



B = [a%K for a in A]
take = [0]*n


BIG = 5001
found = [-1]*BIG
found[0] = -2
prev = [-1]*BIG
prev[0] = -2
used = [False]*BIG

for i in range(n):
    b = B[i]
    for j in range(BIG-1):
        if found[j]!=-1 and not used[j]:
            ind = (b+j)%K
            if found[ind]==-1:
                found[ind] = i
                prev[ind] = j
                used[ind] = True
    for j in range(BIG):
        used[j]=False

if found[V%K]==-1:
    print 'NO'
    sys.exit()
tanks = []
ind = V%K
while prev[ind]!=-2:
    tanks.append(found[ind])
    ind = prev[ind]

master = tanks[0]
tanks = set(tanks)
for i in range(n):
    if i not in tanks:
        other = i
        break
else:
    other = -1
outp = []
for i in range(n):
    if i==master or i==other:
        continue
    if i in tanks:
        A[master] += A[i]
        count = (A[i]+K-1)//K
        if count>0:
            outp.append(" ".join([str(count),str(i+1),str(master+1)]))
        take[i] += count
        A[i] = 0
    else:
        A[other] += A[i]
        count = (A[i]+K-1)//K
        take[i] += count
        if count > 0:
            outp.append(" ".join([str(count),str(i+1),str(other+1)]))
        A[i] = 0
if other==-1:
    for i in range(n):
        if i!=master:
            other=i
            break

if A[master]+A[other]<V:
    print 'NO'
    
    sys.exit()
elif A[master]+A[other]==V:
    print 'YES'
    for s in outp:
        print s
    count = (A[other]+K-1)//K
    if count>0:
        print count,other+1,master+1
    sys.exit()
else:
    count = A[other]//K
    if count>0:
        A[master] += K*(count)
        A[other]%=K
        outp.append(" ".join([str(count),str(other+1),str(master+1)]))
    if A[master]>V:
        count = (A[master]-V)//K
        if count>0:
            outp.append(" ".join([str(count),str(master+1),str(other+1)]))
        A[master]-=count*K
        A[other]+=count*K
    if A[master]==V:

        print 'YES'
        for s in outp:
            print s
    else:
        print 'NO'