CF939A Love Triangle

Description

As you could know there are no male planes nor female planes. However, each plane on Earth likes some other plane. There are $ n $ planes on Earth, numbered from $ 1 $ to $ n $ , and the plane with number $ i $ likes the plane with number $ f_{i} $ , where $ 1

Input Format

The first line contains a single integer $ n $ ( $ 2

Output Format

Output «YES» if there is a love triangle consisting of planes on Earth. Otherwise, output «NO». You can output any letter in lower case or in upper case.

Explanation/Hint

In first example plane $ 2 $ likes plane $ 4 $ , plane $ 4 $ likes plane $ 1 $ , plane $ 1 $ likes plane $ 2 $ and that is a love triangle. In second example there are no love triangles.