Read problems statements in [Hindi], [Mandarin Chinese], [Russian], [Vietnamese] and [Bengali] as well.

The Petrozavodsk camp takes place in about one month. Jafar wants to participate in the camp, but guess what? His coach is Yalalovichik.

Yalalovichik is a legendary coach, famous in the history of competitive programming. However, he is only willing to send to the camp students who solve really hard problems on Timus. He started a marathon at the beginning of December. Initially, he said that people who solve 200 or more problems by the 31-st of December may go to the camp. Jafar made a schedule for the next month. For each day, he knows how many problems he is going to solve.

The problem is that Yalalovichik is a really moody coach — he may wake up tomorrow and change his decision about the deadline and the number of problems that must be solved by this deadline to qualify for the camp. Jafar has $Q$ such scenarios. Now he wants to know: in each scenario, if he does not change his problem solving schedule, will he go to the camp or not?

------  Input ------
The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
The first line of each test case contains a single integer $D$ - the number of days in Jafar's schedule.
$D$ lines follow. For each $i$ ($1 ≤ i ≤ D$), the $i$-th of these lines contains two space-separated integers $d_{i}$ and $p_{i}$ denoting that Jafar will solve $p_{i}$ problems on day $d_{i}$.
The next line contains a single integer $Q$ denoting the number of scenarios Jafar considers.
$Q$ lines follow. For each $i$ ($1 ≤ i ≤ Q$), the $i$-th of these lines contains two space-separated integers $dead_{i}$ and $req_{i}$ denoting a scenario where Yalaovichik decides that students who solve $req_{i}$ problems by day $dead_{i}$ (inclusive) will go to the camp.

------  Output ------
For each scenario, print a single line containing the string "Go Camp" if Jafar is going to the camp or "Go Sleep" otherwise (without quotes).

------  Constraints  ------
$1 ≤ T ≤ 100$
$1 ≤ D ≤ 31$
$1 ≤ d_{i} ≤ 31$ for each valid $i$
$1 ≤ p_{i} ≤ 100$ for each valid $i$
$d_{1}, d_{2}, \ldots, d_{D}$ are pairwise distinct
$1 ≤ Q ≤ 100$
$1 ≤ dead_{i} ≤ 31$ for each valid $i$
$1 ≤ req_{i} ≤ 5,000$ for each valid $i$

----- Sample Input 1 ------ 
1
3
10 5
14 4
31 1
2
9 2
15 7
----- Sample Output 1 ------ 
Go Sleep
Go Camp
----- explanation 1 ------ 
Example case 1:
- By the end of day $9$, Jafar will not have any problem solved.
- By the end of day $15$, Jafar will have $9$ problems solved, which is enough to go to the camp, since he needs at least $7$ problems.

Difficulty: EASY

Solutions:
t = int(input())
for ni in range(t):
	D = int(input())
	l = [0] * 32
	for nj in range(D):
		(d, p) = map(int, input().split())
		l[d] = p
	Q = int(input())
	a = [0] * 32
	for nk in range(Q):
		(de, re) = map(int, input().split())
		if sum(l[:de + 1]) >= re:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	j_s = {}
	l_y = {}
	D = int(input())
	for j in range(D):
		L = list(map(int, input().split()))
		j_s[L[0]] = L[1]
	Q = int(input())
	for i in range(Q):
		(a, b) = map(int, input().split())
		ans = 0
		for elem in j_s:
			if elem <= a:
				ans += j_s[elem]
		if ans >= b:
			print('Go Camp')
		else:
			print('Go Sleep')


i = int(input())
mast = []
for _ in range(i):
	jafar = []
	j = int(input())
	for _ in range(j):
		jafar.append(input().split())
	t = int(input())
	for _ in range(t):
		teach = input().split()
		tot = 0
		for ele in range(j):
			if int(jafar[ele][0]) <= int(teach[0]):
				tot = int(jafar[ele][1]) + tot
		if tot >= int(teach[1]):
			mast.append('Go Camp')
		else:
			mast.append('Go Sleep')
for ele in mast:
	print(ele)


for _ in range(int(input())):
	N = int(input())
	S = {}
	for i in range(N):
		(d, p) = map(int, input().split())
		S[d] = p
	Q = int(input())
	for q in range(Q):
		(d, p) = map(int, input().split())
		solved = 0
		for i in S.keys():
			if i <= d:
				solved += S[i]
			else:
				break
		print('Go Camp' if solved >= p else 'Go Sleep')


for _ in range(int(input())):
	solve = [0] * 31
	for D in range(int(input())):
		(d, p) = map(int, input().split())
		for i in range(d - 1, 31):
			solve[i] += p
	for Q in range(int(input())):
		(d, p) = map(int, input().split())
		if solve[d - 1] >= p:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	plan = {0: 0}
	for _ in range(int(input())):
		(day, qsns) = [int(x) for x in input().split()]
		plan[day] = qsns + plan[list(plan.keys())[-1]]
	for _ in range(int(input())):
		(day, qsns) = [int(x) for x in input().split()]
		reverse_pdays = list(plan.keys())[::-1]
		for pday in reverse_pdays:
			if pday <= day:
				print('Go ' + ('Sleep' if qsns > plan[pday] else 'Camp'))
				break


for _ in range(int(input())):
	n = int(input())
	l = []
	for i in range(n):
		l.append(list(map(int, input().split())))
	x = int(input())
	for i in range(x):
		(d, r) = map(int, input().split())
		for (i, j) in l:
			if i <= d:
				r -= j
			if r <= 0:
				break
		if r <= 0:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	days = int(input())
	a = []
	b = []
	for j in range(days):
		a.append(input().split())
	dead = int(input())
	for k in range(dead):
		d = 0
		p = input().split()
		c = 0
		for i in a:
			if int(i[0]) > int(p[0]):
				c += 1
			else:
				d += int(i[1])
		if c == len(a):
			print('Go Sleep')
		elif d >= int(p[1]):
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	n = int(input())
	l = []
	for i in range(n):
		l.append(list(map(int, input().split())))
	x = int(input())
	for i in range(x):
		(d, r) = map(int, input().split())
		p = 0
		i = 0
		while i < n and l[i][0] <= d:
			p += l[i][1]
			i += 1
		if p >= r:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	s = {}
	for i in range(int(input())):
		(d, p) = map(int, input().split())
		s[d] = p
	for j in range(int(input())):
		(a, b) = map(int, input().split())
		flag = False
		for (i, j) in s.items():
			if i <= a:
				b -= j
			if b <= 0:
				flag = True
				break
		print('Go Camp' if flag else 'Go Sleep')


T = int(input())
for i in range(0, T):
	D = int(input())
	f = {}
	for i in range(0, D):
		(d, p) = map(int, input().split(' '))
		f[d] = p
	Q = int(input())
	for i in range(Q):
		(a, b) = map(int, input().split())
		ans = 0
		for elem in f:
			if elem <= a:
				ans += f[elem]
		if ans >= b:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for _ in range(t):
	d = int(input())
	problems = []
	for i in range(d):
		temp = list(map(int, input().split()))
		problems.append(temp)
	q = int(input())
	for j in range(q):
		(date, req) = map(int, input().split())
		ans = 0
		for i in range(d):
			if problems[i][0] <= date:
				ans += problems[i][1]
		if ans >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	D = int(input())
	l1 = []
	for j in range(D):
		l1.append(list(map(int, input().split())))
	Q = int(input())
	for j in range(Q):
		sum = 0
		l2 = list(map(int, input().split()))
		for j in range(D):
			if l1[j][0] <= l2[0]:
				sum = sum + l1[j][1]
		if sum >= l2[1]:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	D = int(input())
	sched = {}
	for d in range(1, D + 1):
		(d, prob) = [int(x) for x in input().split()]
		sched[d] = prob
	Q = int(input())
	for scen in range(1, Q + 1):
		(dead, req) = [int(x) for x in input().split()]
		solved = 0
		for day in sched:
			if day <= dead:
				solved += sched[day]
		if solved >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


for p in range(int(input())):
	k = int(input())
	a = {}
	for i in range(k):
		(m, n) = map(int, input().split())
		a[m] = n
	c = int(input())
	for i in range(c):
		(m, n) = map(int, input().split())
		t = 0
		for j in a:
			if m >= j:
				t += a[j]
		if t >= n:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	da = int(input())
	d = [0] * 40
	for i in range(da):
		(x, z) = map(int, input().split())
		d[x] = z
	q = int(input())
	for i in range(q):
		(x, z) = map(int, input().split())
		if sum(d[0:x + 1]) >= z:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	k = int(input())
	l1 = []
	for i in range(k):
		l1.append(list(map(int, input().split())))
	q = int(input())
	for i in range(q):
		s = 0
		l2 = list(map(int, input().split()))
		for j in range(k):
			if l1[j][0] <= l2[0]:
				s = s + l1[j][1]
		if s >= l2[1]:
			print('Go Camp')
		else:
			print('Go Sleep')


n = int(input())
for x in range(n):
	n1 = int(input())
	l1 = []
	for y in range(n1):
		l1.append(list(map(int, input().split())))
	for y in range(int(input())):
		l2 = list(map(int, input().split()))
		s = 0
		s1 = 0
		for i in l1:
			if i[0] <= l2[0]:
				s1 = s1 + i[1]
				if s1 >= l2[1]:
					s = 1
					break
		if s == 0:
			print('Go Sleep')
		else:
			print('Go Camp')


T = int(input())
for _ in range(0, T):
	D = int(input())
	ld = []
	lp = []
	for i in range(0, D):
		(d, p) = map(int, input().split())
		ld.append(d)
		lp.append(p)
	Q = int(input())
	ldead = []
	lreq = []
	for i in range(0, Q):
		(dead, req) = map(int, input().split())
		ldead.append(dead)
		lreq.append(req)
	for i in range(0, Q):
		q = 0
		for w in range(0, D):
			if ld[w] <= ldead[i]:
				q += lp[w]
		if q >= lreq[i]:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
while t != 0:
	n = int(input())
	l = []
	for x in range(n):
		l.append(list(map(int, input().split())))
	ind = 0
	m = int(input())
	while m != 0:
		s = 0
		(d, p) = map(int, input().split())
		for j in range(ind, n):
			if l[j][0] <= d:
				s += l[j][1]
			else:
				break
		if s >= p:
			print('Go Camp')
		else:
			print('Go Sleep')
		m -= 1
	t -= 1


for i in range(int(input())):
	d = int(input())
	c = []
	for j in range(d):
		c.append(list(map(int, input().split(' '))))
	q = int(input())
	e = []
	for j in range(q):
		e.append(list(map(int, input().split(' '))))
	for j in range(q):
		s = 0
		p = e[j][0]
		for k in range(d):
			if c[k][0] > p:
				break
			s = s + c[k][1]
		if s >= e[j][1]:
			print('Go Camp')
		else:
			print('Go Sleep')


for z in range(int(input())):
	d = {}
	for i in range(1, 32):
		d[i] = 0
	for y in range(int(input())):
		(a, k) = list(map(int, input().split()))
		for i in range(a, 32):
			d[i] += k
	for q in range(int(input())):
		(m, n) = list(map(int, input().split()))
		if d[m] < n:
			print('Go Sleep')
		else:
			print('Go Camp')


for _ in range(int(input())):
	d = int(input())
	b = {}
	for i in range(d):
		(n, p) = map(int, input().split())
		b[n] = p
	q = int(input())
	for j in range(q):
		(dead, req) = map(int, input().split())
		solved = 0
		for k in b.keys():
			if k <= dead:
				solved += b[k]
			else:
				break
		print('Go Camp' if solved >= req else 'Go Sleep')


(t, i) = (int(input()), 1)
(j, k, d, solved) = (1, 1, {}, 0)
while i <= t:
	days = int(input())
	while j <= days:
		pd = list(map(int, input().split()))
		d[pd[0]] = pd[1]
		j += 1
	scenarios = int(input())
	while k <= scenarios:
		sd = list(map(int, input().split()))
		for key in d.keys():
			if key <= sd[0]:
				solved += d[key]
		if solved >= sd[1]:
			print('Go Camp')
		else:
			print('Go Sleep')
		solved = 0
		k += 1
	(j, k, d) = (1, 1, {})
	i += 1


for _ in range(int(input())):
	l = []
	for i in range(int(input())):
		(d, p) = map(int, input().split())
		l.append([d, p])
	for q in range(int(input())):
		(dead, req) = map(int, input().split())
		(cnt, i) = (0, 0)
		while i < len(l):
			if l[i][0] > dead:
				break
			elif l[i][0] <= dead:
				cnt = cnt + l[i][1]
			i = i + 1
		if cnt >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	days = int(input())
	total_sums = [0] * 31
	for __ in range(days):
		(day, prob) = map(int, input().split())
		total_sums[day - 1] = prob
	for i in range(int(input())):
		(day, pass_) = map(int, input().split())
		if sum(total_sums[:day]) >= pass_:
			print('Go Camp')
		else:
			print('Go Sleep')


t = input()
for c in range(0, int(t)):
	days = int(input())
	solved_arr = [0] * 31
	for j in range(days):
		(day, problems) = map(int, input().split())
		solved_arr[day - 1] = problems
	scenarios = int(input())
	for j in range(scenarios):
		(day, required) = map(int, input().split())
		if sum(solved_arr[:day]) >= required:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	n = int(input())
	(d, s) = ({}, 0)
	for i in range(n):
		(a, b) = map(int, input().split())
		s += b
		d[a] = s
	n1 = int(input())
	for _ in range(n1):
		(a, b) = map(int, input().split())
		for i in d:
			if i <= a:
				if d[i] >= b:
					print('Go Camp')
					break
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	d = int(input())
	days = []
	quesn = []
	sum = 0
	ans = False
	for i in range(d):
		(di, pi) = map(int, input().split())
		days.append(di)
		sum += pi
		quesn.append(sum)
	for i in range(int(input())):
		flag = 0
		(deadi, reqi) = map(int, input().split())
		for j in range(len(days)):
			if days[j] <= deadi:
				if quesn[j] >= reqi:
					print('Go Camp')
					flag = 1
					break
		if flag == 0:
			print('Go Sleep')


t = int(input())
for i in range(t):
	d = int(input())
	days = []
	quesn = []
	for i in range(d):
		(di, pi) = map(int, input().split())
		days.append(di)
		quesn.append(pi)
	q = int(input())
	for i in range(q):
		flag = 0
		t = 0
		(deadi, reqi) = map(int, input().split())
		for j in range(len(days)):
			if days[j] <= deadi:
				t += quesn[j]
			else:
				break
		if t < reqi:
			print('Go Sleep')
		else:
			print('Go Camp')


for _ in range(int(input())):
	sdl = int(input())
	days = []
	sol = [0]
	for i in range(sdl):
		(a, b) = map(int, input().split())
		days.append(a)
		sol.append(b + sol[i])
	sol.pop(0)
	for _ in range(int(input())):
		(dead, req) = map(int, input().split())
		flg = True
		for (i, j) in zip(days, sol):
			val = dead - i
			if val < 0 and flg:
				print('Go Sleep')
				break
			elif val >= 0:
				flg = False
				if j >= req:
					print('Go Camp')
					break
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	n = int(input())
	l = []
	for j in range(n):
		a = list(map(int, input().split()))
		b = []
		for k in range(2):
			b.append(a[k])
		l.append(b)
	m = int(input())
	c = []
	for j in range(m):
		a = list(map(int, input().split()))
		b = []
		for k in range(2):
			b.append(a[k])
		c.append(b)
	for j in range(m):
		flag = x = y = 0
		for k in range(n):
			x = l[k][0]
			y = y + l[k][1]
			if x <= c[j][0]:
				if y >= c[j][1]:
					print('Go Camp')
					flag = 1
					break
		if flag == 0:
			print('Go Sleep')


for _ in range(int(input())):
	d = int(input())
	arr = []
	for i in range(d):
		arr.append([int(i) for i in input().split()])
	q = int(input())
	dead = []
	for i in range(q):
		dead.append([int(i) for i in input().split()])
	for i in range(q):
		flag = True
		solved = 0
		for j in range(d):
			if arr[j][0] <= dead[i][0]:
				solved += arr[j][1]
			if solved >= dead[i][1]:
				flag = False
				break
		if flag:
			print('Go Sleep')
		else:
			print('Go Camp')


T = int(input())
for i in range(T):
	n = int(input())
	points = []
	days = []
	for z in range(n):
		(d, p) = map(int, input().split())
		points.append(p)
		days.append(d)
	hg = int(input())
	for ap in range(hg):
		(o, p2) = map(int, input().split())
		sumer = 0
		for ao in days:
			if o >= ao:
				sumer += points[days.index(ao)]
		if sumer >= p2:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for tc in range(t):
	plan = {}
	d = int(input())
	for day in range(d):
		(di, pi) = map(int, input().split())
		plan[di] = pi
	q = int(input())
	for dead in range(q):
		(deadi, reqi) = map(int, input().split())
		print('Go Camp' if sum((plan[day] for day in filter(lambda x: x <= deadi, plan.keys()))) >= reqi else 'Go Sleep')


t = int(input())
while t:
	D = int(input())
	d = {}
	for i in range(D):
		(x, y) = [int(i) for i in input().split()]
		d[x] = y
	q = int(input())
	for i in range(q):
		(x, y) = [int(i) for i in input().split()]
		ans = 0
		for (key, val) in d.items():
			if x >= key:
				ans += val
		if ans >= y:
			print('Go Camp')
		else:
			print('Go Sleep')
	t -= 1


def solve(days_list, pro_list, di, ri):
	ans = 0
	n = len(days_list)
	for i in range(n):
		if di < days_list[i]:
			break
		else:
			ans += pro_list[i]
	if ans >= ri:
		print('Go Camp')
	else:
		print('Go Sleep')
for _ in range(int(input(''))):
	days_list = []
	pro_list = []
	for a in range(int(input(''))):
		(d, p) = map(int, input('').split())
		days_list.append(d)
		pro_list.append(p)
	for b in range(int(input(''))):
		(di, ri) = map(int, input('').split())
		solve(days_list, pro_list, di, ri)


for _ in range(int(input())):
	f = [0] * 32
	d = int(input())
	for i in range(d):
		(d1, p1) = map(int, input().split())
		f[d1] = p1
	for i in range(int(input())):
		(de, r) = map(int, input().split())
		total = 0
		for j in range(de + 1):
			total += f[j]
		if total >= r:
			print('Go Camp')
		else:
			print('Go Sleep')


for t in range(int(input())):
	D = int(input())
	schedule = []
	for i in range(D):
		schedule.append([int(x) for x in input().split()])
	Q = int(input())
	for i in range(Q):
		(dead, req) = [int(x) for x in input().split()]
		Jafars_solved_problems = 0
		for s in schedule:
			if s[0] > dead:
				break
			Jafars_solved_problems += s[1]
		if Jafars_solved_problems >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


T = int(input())
for tj in range(T):
	n_days = int(input())
	tracking_list = []
	for i in range(n_days):
		(di, pi) = map(int, input().split())
		tracking_list.append([di, pi])
	Q = int(input())
	scenarios = []
	for i in range(Q):
		(deadi, reqi) = map(int, input().split())
		scenarios.append([deadi, reqi])
	for i in range(Q):
		count = 0
		for j in range(n_days):
			if tracking_list[j][0] <= scenarios[i][0]:
				count += tracking_list[j][1]
		if count >= scenarios[i][1]:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	(d, q) = ([], [])
	(continueloop, problemsolved) = (True, 0)
	for _ in range(int(input())):
		m = [int(x) for x in input().split(' ')]
		d.append(m)
	for _ in range(int(input())):
		q = [int(x) for x in input().split(' ')]
		problemsolved = 0
		for i in d:
			if q[0] < i[0]:
				break
			else:
				problemsolved += i[1]
		if problemsolved < q[1]:
			print('Go Sleep')
		else:
			print('Go Camp')


for _ in range(int(input())):
	(D, P) = ([], [])
	for _ in range(int(input())):
		(d, p) = map(int, input().split())
		D.append(d)
		P.append(p)
	for _ in range(int(input())):
		f = 0
		(de, re) = map(int, input().split())
		p = 0
		for i in range(len(D)):
			if de < D[i]:
				break
			else:
				p += P[i]
		if p < re:
			print('Go Sleep')
		else:
			print('Go Camp')


import numpy as np
t = int(input())
for i in range(0, t):
	n = int(input())
	c = []
	s = []
	for j in range(0, n):
		b = list(map(int, input().split()))
		a = np.array(b)
		c.append(a[0])
		s.append(a[1])
	m = np.array(c)
	p = np.array(s)
	q = int(input())
	for j in range(0, q):
		g = list(map(int, input().split()))
		f = np.array(g)
		d = f[0]
		r = f[1]
		count = 0
		for l in range(0, n):
			if d < m[l]:
				break
			count = count + p[l]
		if count >= r:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	n = int(input())
	l = [0] * 31
	s = 0
	for j in range(n):
		(a, b) = map(int, input().split())
		s += b
		l[a - 1:] = [s] * len(l[a - 1:])
	d = int(input())
	for j in range(d):
		(c, d) = map(int, input().split())
		if l[c - 1] >= d:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	a = [0] * 31
	b = 0
	for i in range(int(input())):
		(c, d) = map(int, input().split())
		b += d
		a[c - 1] = b
	for i in range(int(input())):
		(c, d) = map(int, input().split())
		if max(a[:c]) >= d:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for test in range(t):
	d = int(input())
	(schedule, scenarios, achieve) = ([], [], [])
	for i in range(d):
		schedule.append(tuple(map(int, input().split())))
	q = int(input())
	for i in range(q):
		scenarios.append(tuple(map(int, input().split())))
	schedule = sorted(schedule, key=lambda x: x[0])
	(j, solved) = (0, 0)
	for i in range(1, 32):
		if j < d:
			if schedule[j][0] == i:
				solved += schedule[j][1]
				j += 1
		achieve.append(solved)
	for (day, target) in scenarios:
		if achieve[day - 1] >= target:
			print('Go Camp')
		else:
			print('Go Sleep')


for _ in range(int(input())):
	day = int(input())
	xd = []
	temp_num = 0
	temp_day = 1
	for i in range(day):
		(d, p) = map(int, input().split())
		xd += [temp_num] * (d - temp_day)
		temp_day = d
		temp_num += p
	xd += [temp_num] * (32 - temp_day)
	q = int(input())
	for i in range(q):
		(dead, req) = map(int, input().split())
		if xd[dead - 1] >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


for t in range(int(input())):
	n = int(input())
	x = [0] * 31
	for i in range(n):
		(a, b) = map(int, input().split())
		for j in range(a - 1, 31):
			x[j] += b
	n1 = int(input())
	for i in range(n1):
		(a1, b1) = map(int, input().split())
		if x[a1 - 1] < b1:
			print('Go Sleep')
		else:
			print('Go Camp')


T = int(input())
for i in range(T):
	n = int(input())
	m = [0] * 32
	for i in range(n):
		(t1, t2) = [int(x) for x in input().split()]
		m[t1] = t2
	k = int(input())
	for i in range(k):
		(t1, t2) = [int(x) for x in input().split()]
		ts = sum(m[:t1 + 1])
		if t2 <= ts:
			print('Go Camp')
		else:
			print('Go Sleep')


for i in range(int(input())):
	n = int(input())
	d = []
	p = []
	for i in range(n):
		(a, b) = map(int, input().split())
		d.append(a)
		p.append(b)
	q = int(input())
	for j in range(q):
		(dead, req) = map(int, input().split())
		i = 0
		c = 0
		while i < n and d[i] <= dead:
			c += p[i]
			i += 1
		if c >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


t = int(input())
for i in range(t):
	b = int(input())
	d = []
	p = []
	for j in range(b):
		(m, n) = map(int, input().split())
		d.append(m)
		p.append(n)
	c = int(input())
	dead = []
	req = []
	for k in range(c):
		(dead, req) = map(int, input().split())
		l = 0
		n = 0
		while l < b and dead >= d[l]:
			n = n + p[l]
			l = l + 1
		if n >= req:
			print('Go Camp')
		else:
			print('Go Sleep')


subtask = int(input())
for i in range(subtask):
	planning = dict()
	D = int(input())
	for j in range(D):
		(d, q) = [int(k) for k in input().split()]
		planning[d] = q
	Q = int(input())
	for j in range(Q):
		criteria = 0
		(rd, rq) = [int(k) for k in input().split()]
		for item in planning:
			if item <= rd:
				criteria += planning[item]
		if criteria >= rq:
			print('Go Camp')
		else:
			print('Go Sleep')