#yuki930 import sys n=int(raw_input()) a=map(int,raw_input().split()) if a[0]>a[n-1]: print 'No' sys.exit() print 'Yes' for i in range(1,n-1): if a[0]a[i]: print a[i], print a[n-1]