#!/usr/bin/env python3
import random
n = int(input())
a = list(map(int, input().split()))

def poss(a): return sum(a) >= 2*max(a)

if sum(a) % 2 or not poss(a): print('NO')
else:
    print('YES')
    while sum(a):
        (i,j) = random.sample(range(n), 2)
        a[i] -= 1
        a[j] -= 1
        if a[i] >= 0 and a[j] >= 0 and poss(a):
            print('%d %d' % (i+1, j+1))
        else:
            a[i] += 1
            a[j] += 1

