import static ru.ifmo.testlib.Outcome.Type.FAIL;
import static ru.ifmo.testlib.Outcome.Type.OK;
import static ru.ifmo.testlib.Outcome.Type.WA;

import java.awt.Point;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;

import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

public class Check implements ru.ifmo.testlib.Checker {

	int calc(int k, int[] a, int ans, Outcome.Type type) {
		if (ans < 1 || ans > a.length - k + 1) {
			throw new Outcome(type, String.format("answer out of range: %d", ans));
		}
		ans--; // 0..n-k
		HashSet<Integer> hs = new HashSet<Integer>();
		for (int i = ans; i < ans + k; i++) {
			hs.add(a[i]);
		}
		return hs.size();
	}

	@Override
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		int n = inf.nextInt();
		int k = inf.nextInt();
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = inf.nextInt();
		}
		int pans = ouf.nextInt();
		int jans = ans.nextInt();
		int jres = calc(k, a, jans, FAIL);
		int pres = calc(k, a, jans, WA);
		if (jres > pres) {
			throw new Outcome(WA, String.format("Jury has better solution %d, instead of %d", jres, pres));
		}
		if (jres < pres) {
			throw new Outcome(WA, String.format("Contestant found better solution %d, instead of %d", pres, jres));
		}
		throw new Outcome(OK, String.format("%d cities at %d", pres, pans));
	}

}
