1 1 1
1000000000
2 1
 20 2 15
12698951 55128070 116962690 156763505 188535242 194018601 269939893 428710623 442819431 483000923 516768937 552903993 633087286 656092270 671535141 714291344 717660646 846508634 879748146 937368929
2 7
1 2
2 4
1 19
1 12
1 5
2 18
2 11
1 16
2 1
2 3
2 19
1 17
2 9
2 6
 6 3 10
62417580 78150524 410053501 582708235 630200761 760672946
2 2
1 5
1 2
1 4
2 4
2 1
2 1
1 6
2 5
2 6

NO
 NO
NO
NO
NO
NO
NO
YES
NO
NO
 NO
YES
NO
NO
YES
YES

def calcPoint(p, c, x):
	return max(0, p - c*x)

def getScore(plst, tlst, n, c):
	L_map = {}
	R_map = {}
	_TL = 0
	_TR = 0
	for i,t in enumerate(tlst):
		_TL += t
		_TR += tlst[len(tlst) - i - 1]
		L_map[i] = _TL
		R_map[i] = _TR
	scoreL = 0
	scoreR = 0
	for i in range(len(plst)):
		x_L = L_map[i]
		x_R = R_map[i]
		scoreL += calcPoint(plst[i], c, x_L)
		scoreR += calcPoint(plst[len(plst) - i - 1], c, x_R)
	if scoreL > scoreR:
		return "Limak"
	if scoreR > scoreL:
		return "Radewoosh"
	return "Tie"

def calc_friend(display_lst, point_lst, n, q, i):
	
	if q == 2:
		if i in display_lst:
			return "YES"
		return "NO"
	if q == 1:
		min_point = float("inf")
		min_index = 0
		if len(display_lst) < n:
			display_lst.append(i)
			return None
		for index, j in enumerate(display_lst):
			point = point_lst[j - 1]
			if point < min_point:
				min_index = j
				min_point = point
		display_lst.remove(min_index)
		display_lst.append(i)
		return None

def main():
	first_line = input()
	second_line = input()
	
	first_line = list(map(lambda a: int(a), first_line.split()))
	second_line = list(map(lambda a: int(a), second_line.split()))
	n = first_line[0]
	k = first_line[1]
	q = first_line[2]
	display_lst = []

	for i in range(q):
		third_line = input()
		third_line = list(map(lambda a: int(a), third_line.split()))
		v = calc_friend(display_lst, second_line, k, third_line[0], third_line[1])
		if v:
			print(v)

if __name__ == "__main__":
	main()