#ENGLISHP21. Teamwork

Teamwork

Description

There are N candidates. Each candidate has a cooperation value and a working value. Select a subset of candidates to form a team, such that the sum of cooperation values is positive and the sum of working values is maximum.

Input Format

First line: one positive integer N (N <= 100).
Next N lines: the i-th line contains two integers (between -100 and 100), indicating the cooperation value and the working value of the i-th candidate.

Output Format

One line contains several integers, indicating the indexes of selected candidates.

4
2 -1
4 -2
1 1
2 3 4