Vishal Wants to buy 2 gifts for his best friend whose name is Annabelle(her age is 20), So they both went for shopping in a store. But Annabelle gave, Vishal a condition that she will accept this gifts only when the total price of the gifts is the same as her age times 100.
The store contains, a list of items whose prices are also displayed, Now Vishal is asking for your help to buy gifts, as he wants to impress Annabelle this time.
Note: Vishal cannot buy the same item more than once.
-----Input:-----
- The first line of the input contains a single integer $T$. $T$ denoting the number of test cases. The description of $T$ test cases is as follows.
- The next line of the input contains a single integer $N$. $N$ denotes the total number of items in store.
- The next line of the input contains $N$ space-separated integers $A1, A2, A3...An$ where $ith$ number denotes the price of $ith$ element.
-----Output:-----
- For each test-case print "Accepted"(without quotes) if the gifts are accepted by Annabelle, else print "Rejected"(without quotes)
-----Constraints:-----
- $1 \leq T \leq 10^3$
- $1 \leq N \leq 10^5$
- $1 \leq A1, A2, A3...An \leq 10^7$
-----Sample Input:-----
1
5
10 2 1000 50 1000
-----Sample Output:-----
Accepted
-----Explanation:-----
- As the given list of items have 2 items whose price sum up to the age times 100 of Annabelle i.e. 1000+1000 = (20 *100)
from sys import stdin, stdout
from itertools import combinations
input = stdin.readline
print2 = stdout.write
def sub_lists(my_list, le):
 for x in combinations(my_list, 2):
  #print(x)
  if sum(x) == 2000:
   return "Accepted"
 return "Rejected"

for _ in range(int(input())):
 n = int(input())
 if n == 1:
  input()
  print("Rejected")
  continue
 elif n == 2:
  if sum(map(int, stdin.readline().split())) != 2000:
   print("Rejected")
  else:
   print("Accepted")
  continue
 a = sorted(list(map(int, stdin.readline().split())))
 i = n - 1
 while i >= 0 and a[i] > 2000:
  i -= 1
 if i <= 0:
  print("Rejected")
  continue
 i += 1
 if sum(a[:i]) < 2000:
  print("Rejected")
  continue
 print(sub_lists(a[:i], i))
from sys import stdin, stdout
from itertools import combinations
input = stdin.readline
print2 = stdout.write
def sub_lists(my_list, le):
 for x in combinations(my_list, 2):
  #print(x)
  if sum(x) == 2000:
   return "Accepted"
 return "Rejected"

for _ in range(int(input())):
 n = int(input())
 if n == 1:
  input()
  print("Rejected")
  continue
 elif n == 2:
  if sum(map(int, stdin.readline().split())) != 2000:
   print("Rejected")
  else:
   print("Accepted")
  continue
 a = sorted(list(map(int, stdin.readline().split())))
 i = n - 1
 while i >= 0 and a[i] > 2000:
  i -= 1
 if i <= 0:
  print("Rejected")
  continue
 i += 1
 if sum(a[:i]) < 2000:
  print("Rejected")
  continue
 print(sub_lists(a[:i], i))