PROGRAMMING:Imperial dining room
It was very hard for the imperial dining room to prepare the emperor's breakfast. It was hard because the emperor was very picky and asked that he could not eat the same breakfast in the next two days. According to the raw materials, the imperial dining room prepared the breakfast menu for the next few days. But the chef doesn't know mathematics, and the menu is repeated in two days. Can you judge whether it can be adjusted to two days without repetition according to the menu?
###Input format:
The first is a positive integer n (1 < n < 100), which means that the chef has prepared the menu for n days.
Then there are n positive integers PI (1 < PI < 100), and each number represents the breakfast content of the day. The same number means the same content.
###Output format:
If it can be adjusted to two consecutive days without repetition, it will be output
```
YES
```
Otherwise, it will be output
```
NO
```
###Input example:
```in
six
1 2 4 6 6 4
```
###Output example:
```out
YES
```
answer:If there is no answer, please comment
###Input format:
The first is a positive integer n (1 < n < 100), which means that the chef has prepared the menu for n days.
Then there are n positive integers PI (1 < PI < 100), and each number represents the breakfast content of the day. The same number means the same content.
###Output format:
If it can be adjusted to two consecutive days without repetition, it will be output
```
YES
```
Otherwise, it will be output
```
NO
```
###Input example:
```in
six
1 2 4 6 6 4
```
###Output example:
```out
YES
```
answer:If there is no answer, please comment