Guitar#492

Guitar

1 second
256 megabytes
Very easy

Mr. T wants to learn a new song on a -string guitar. He downloaded the tabs for it  — a sequence of notes, for each string, that one has to play throughout the song.

However, sometimes songs involve some crazy finger positions on the guitar riff, like placing one finger at the 1st note and the other at the 11th, which requires an insane amount of stretch! Mr. T, for example, can only simultaneously reach notes that are not further than units from each other.

The song goes for seconds, and the tabs are given by arrays s_1, s_2, s_3 with s_{i,j} representing the note you have to play on the -th string at the -th second. If s_{i,j} = -1, then the -th string is simply not played at the moment (so Mr. T doesn't have to stretch his fingers to touch it); if s_{i,j} = 0, then the -th string is played "open"  — that is, Mr. T doesn't have to touch it as well. If s_{i,j} > 0, then Mr. T has to place his finger on that string exactly at the s_{i,j}-th note at time .

Now he is curious if he can play the full song, that is, whether there doesn't exist any moment of time where he'd have to hold two notes that are too far from each other. If there does, output the first moment of time when it happens.

Input

The first line of input contains a single integer (1 \le n \le 1000) — the length of the song.

The next lines contain integers each s_{i,1}, s_{i,2}, \dots, s_{i,n} (-1 \le s_{i,j} \le 19).

Output

Output a single token  — "Yes" if Mr. T can play the full song, and "No" if he can't. If the answer is "No", in the second line output a single integer denoting the first moment of time at which he'd fail.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Note

In the first example, Mr. T never has to reach notes at a distance of more than at any moment of time.

In the second example, during the -nd second, Mr. T has to play the -nd string at note while also playing the -rd string at the -th note, with the two being at a distance of which is too far for Mr. T.

In the third example, Mr. T doesn't have to play the -rd string, and doesn't need to touch the -st string, so he can place his only finger on the string at any note.