A new semester has begun — which means your training in the esports team for Doka 3.
Today you are playing for the first time as a hero named Midas. Experienced teammates have told you that the power of this hero directly depends on the amount of gold he accumulates.
To earn gold, you must defeat monsters.
On the world map, there are n monsters that you can fight in any order. You can fight each monster only once.
For the i-th monster, two characteristics are known:
Initially, you have 0 gold. Your goal in the game is to accumulate at least w gold.
Find the minimum number of monsters you need to defeat to achieve this goal, as well as the indices of the monsters in the order you should fight them.
The first line contains an integer w (1 ≤ w ≤ 109) — the amount of gold that is your goal in the game.
The second line contains an integer n (1 ≤ n ≤ 105) — the number of monsters you can fight.
Each of the following n lines contains two integers gi and bi (1 ≤ gi ≤ 109, 0 ≤ bi ≤ 109) — the characteristics of the i-th monster as described in the problem.
In the first line, output an integer k — the minimum number of battles with monsters required to achieve the goal of w gold.
If you cannot achieve the goal in any way — output - 1.
If successful, in the second line output k numbers — the indices of the monsters in the order you should fight them.
Assume that the monsters are numbered in the order they are mentioned in the input data.
If there are multiple valid answers that lead to the minimum number of battles, output any of them.
28
8
5 2
7 25
4 0
6 1
2 20
3 3
8 7
4 15
6
3 4 1 6 7 8
5
1
5 1
-1
First test example
Let's describe the sequence of battles and the gold earned.
Note that there are other orders/choices of monsters for battles.
Second test example
You start with 0 gold, and the only available monster requires 1 gold to defeat.
You cannot accumulate w = 5 gold, so you must output - 1.
| Name |
|---|


