There is a matrix *A* of size *x* × *y* filled with integers. For every <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/e87325918316c52884e4063f23cf77cfe475ee7c.png" style="max-width: 100.0%;max-height: 100.0%;"/>, <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/b2547b0e9acdacd0f9e1ca13295a4cc301cde743.png" style="max-width: 100.0%;max-height: 100.0%;"/> *A*<sub class="lower-index">*i*, *j*</sub> = *y*(*i* - 1) + *j*. Obviously, every integer from [1..*xy*] occurs exactly once in this matrix. 

You have traversed some path in this matrix. Your path can be described as a sequence of visited cells *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> denoting that you started in the cell containing the number *a*<sub class="lower-index">1</sub>, then moved to the cell with the number *a*<sub class="lower-index">2</sub>, and so on.

From the cell located in *i*-th line and *j*-th column (we denote this cell as (*i*, *j*)) you can move into one of the following cells:
1.  (*i* + 1, *j*) — only if *i* &lt; *x*; 1.  (*i*, *j* + 1) — only if *j* &lt; *y*; 1.  (*i* - 1, *j*) — only if *i* &gt; 1; 1.  (*i*, *j* - 1) — only if *j* &gt; 1.
Notice that making a move requires you to go to an adjacent cell. It is not allowed to stay in the same cell. You don't know *x* and *y* exactly, but you have to find any possible values for these numbers such that you could start in the cell containing the integer *a*<sub class="lower-index">1</sub>, then move to the cell containing *a*<sub class="lower-index">2</sub> (in one step), then move to the cell containing *a*<sub class="lower-index">3</sub> (also in one step) and so on. Can you choose *x* and *y* so that they don't contradict with your sequence of moves?
The first line contains one integer number *n* (1 ≤ *n* ≤ 200000) — the number of cells you visited on your path (if some cell is visited twice, then it's listed twice).

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>) — the integers in the cells on your path.
The matrix and the path on it in the first test looks like this:

Also there exist multiple correct answers for both the first and the third examples.
8
1 2 3 6 9 8 5 2
YES
1000000000 3
6
1 2 1 2 5 3
NO
2
1 10
YES
1000000000 9
3
1 2 2
NO
1
1
YES
1000000000 1
1
6
YES
1000000000 1
2
2 3
YES
1000000000 1
2
1000000000 1
YES
1000000000 999999999
4
3 2 4 2
NO
5
1 2 5 4 3
NO
2
1 1
NO
3
1 3 4
YES
1000000000 2
1
1000000000
YES
1000000000 1
6
1 4 5 6 3 2
YES
1000000000 3
8
1 2 3 6 9 8 7 6
NO
9
4 3 2 1 5 6 7 8 9
NO
8
2 5 8 9 6 3 2 1
YES
1000000000 3
4
1 2 1 3
YES
1000000000 2
3
1 4 3
NO
5
1 2 3 4 1
NO
6
3 5 2 1 2 1
NO
2
1000000000 999999999
YES
1000000000 1
3
2 4 3
YES
1000000000 2
5
1 2 3 2 4
NO
6
10 8 6 4 2 1
YES
1000000000 2
7
1 4 7 8 9 10 11
NO
8
1 2 3 2 3 4 3 8
YES
1000000000 5
4
3 4 3 5
YES
1000000000 2
4
1 4 3 2
NO
13
1 3 4 6 5 3 1 2 4 6 5 3 1
YES
1000000000 2
3
1 3 2
NO
6
4 3 6 9 8 7
NO
6
1 2 4 3 5 6
YES
1000000000 2
5
1 2 4 3 1
YES
1000000000 2
5
1 2 4 3 5
YES
1000000000 2
5
3 6 5 4 3
NO
37
94 7 32 29 57 22 11 70 57 61 12 75 93 24 4 47 98 43 99 22 50 32 37 64 80 9 40 87 38 70 17 41 77 76 20 66 48
NO
2
99999999 100000000
YES
1000000000 1
5
3 4 5 6 2
NO
6
3 8 7 6 5 4
NO
10
999999999 999999998 999999997 999999996 999999995 999999994 999999993 999999992 999999991 999999990
YES
1000000000 1
2
1000000000 999999998
YES
1000000000 2
5
8 9 10 14 13
NO
4
1 3 2 4
NO
4
2 3 5 6
NO
5
1 2 3 4 2
NO
3
5 6 4
YES
1000000000 2
1
1000000
YES
1000000000 1
3
9 10 1
NO
28
1 3 5 7 9 10 8 6 4 2 1 2 4 3 5 6 8 7 9 10 8 7 5 6 4 3 1 2
YES
1000000000 2
5
3 4 5 6 9
NO
3
6 8 7
YES
1000000000 2
1
100000000
YES
1000000000 1
6
2 4 6 5 6 5
YES
1000000000 2
2
999999999 1000000000
YES
1000000000 1
4
3 6 7 8
NO
23
92 34 58 40 76 3 38 66 76 23 85 36 47 43 22 46 98 72 97 80 57 77 96
NO
3
6 7 4
NO
4
1 2 4 3
YES
1000000000 2
3
3 2 4
NO
5
1 4 3 2 1
NO
5
1 3 5 4 3
NO
3
19260816 19260817 19260818
YES
1000000000 1
3
1 3 6
NO
2
999999998 1000000000
YES
1000000000 2
8
2 4 6 5 6 5 3 4
YES
1000000000 2
3
4 3 6
NO
2
246642 246641
YES
1000000000 1
3
9 7 5
YES
1000000000 2
10
1 2 1 2 1 2 1 2 1 2
YES
1000000000 1
5
1 3 5 7 8
YES
1000000000 2
4
1 10 9 10
NO
2
2 4
YES
1000000000 2
8
1 2 4 3 5 6 8 7
YES
1000000000 2
3
4 3 2
YES
1000000000 1
3
3 2 1
YES
1000000000 1
4
999 1000 2000 2001
NO
3
4 2 5
NO
2
500000000 1000000000
YES
1000000000 500000000
3
4 5 7
NO
5
1 3 4 5 4
NO
7
550 555 554 553 554 555 560
YES
1000000000 5
n = int(input())
A = list(map(int, input().split()))
#D = []
D = set()
for i in range(n-1):
    temp = abs(A[i+1]-A[i])
    if temp != 1:
        D.add(temp)
    #D.append(A[i+1]-A[i])
#print(D)
if len(D) == 1:
    D = list(D)
    y = D[0]
    print('YES')
    print(10**9, y)
elif len(D) == 0:
    print('YES')
    print(10**9, 10**9)
else:
    print('NO')
