Just checking

Report a typo

Write a program that reads an unsorted array of integers and two numbers: P and M. The program needs to check whether P and M occur in the array.

The first line contains the size of an array.
The next N lines contain elements of the array.
The last line contains two integer numbers P and M, separated by one space character.

If both numbers occur in the array you need to print YES, otherwise NO.

Sample Input 1:

3
1
3
2
2 3

Sample Output 1:

YES

Sample Input 2:

3
1
2
3
3 4

Sample Output 2:

NO
Write a program in Kotlin
fun main() {
// write your code here
}
___

Create a free account to access the full topic