---
# System prepended metadata

title: Backpack 2

---

# Backpack 2

Given $N$ gold bars, each bar has its own weight. You have a backpack with a weight limit $S$. Calculate the maximum weight of gold you can take at once, if it is **NOT allowed** to break the bars into parts.

## Input format
The ﬁrst line of input contains two integers $S$ and $N$ ($1 \le S \le 10^4$; $1 \le N \le 300$). The second line contains $N$ integers — weights of the bars. Each bar has a non-negative weight not exceeding $10^5$.

## Output format
In the ﬁrst line print two integers — maximum weight of gold you can take at once and number of bars to take. In the second line print the bars you will take. Bars are numbered by sequential integers starting from 1 in the same order as they are listed in the input. If there is more than one solution, print any of them.

## Sample

### Input
```
10 6
2 3 4 4 6 9
```

### Output
```
10 3
1 3 4
```

