There are multiple test cases. The number of test cases T (T <= 200) is given
in the first line of the input file. For each test case, there is only one line
containing five integers N, S1, V1, S2, V2, denoting the size of the treasure chest is
N and the size and value of an emerald is S1 and V1, size and value of a sapphire
is S2, V2. All integers are positive and fit in 32-bit signed integers.