URI Online Judge | 3073
# Vectors

**Timelimit: 1**

By Luka Milićević Serbia

A set of **M** vectors {**v1, v2**,...,**v _{M}**} in R

In this task, you are given **N** vectors in **R ^{d}** , and every vector has some weight. Your job is to find a linearly independent set of vectors with maximal sum of weights.

The first line contains two integers **d** and **N** . The next **N** lines contain **d+1** integers each, separated with one empty space between any two integers. The first **d** numbers in the line **i+1** are coordinates of the **i ^{th}** vector, and the last number is its weight.

The output should consist a single integer: the sum of weights of vectors in your set.

Input Sample | Output Sample |

4 4 1 0 0 0 30 0 0 1 0 30 1 0 1 0 100 0 0 0 1 1 |
131 |