You are given a list of N integers and a value K. Print 1 if K exists in the given list of N integers, otherwise print −1.

INPUT:

- First-line will contain two numbers N and K
- Next line contains NN space-separated numbers.

Test Cases -

Sample Input 1:

4 2

1 2 3 4

Output

1

my code:

N,K = map(int,input().split())

list1 = list(map(int,input().split()))[:N]

flag = -1

#checking for the value of K in list1

for i in list1:

if i == K:

flag = 1

print(flag)