# your code goes here
arr=list(map(int, input().split()))
n=int(input())
k=int(input())
found=False
for i in range(n):
	for j in range(i+1, n):
		if j<=i+k and arr[i]==arr[j]:
			print("The valid pair from equal elements", k)
			found=True
			break
	if found:
		break
if not found: 
	print("there are no equal elements from array", k)
			