For loops task

Report a typo

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

The first line contains the size of the list.
The next N lines contain the elements of the list.
The last line contains two integer numbers P and M separated by a space.

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

Sample Input 1:

3
1
3
2
2 3

Sample Output 1:

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

Create a free account to access the full topic