Sanjoli Agarwal has recently been placed in Amazon and everyone is after her for chocolates and treats. So to cut short on her expenses she buys a big bar of Bournville of length N and decides to cut it into pieces of either length a, b, c or d in such a manner so that the number of pieces is maximised. (After cutting, only pieces of length a, b, c and d are allowed). Help her find the maximum number of pieces that she can get.
The first line contains T: Number of test cases.
Each of the following T lines contains a single test case which has 5 numbers N, a, b, c, d.
The values of a, b, c and d may be same
For each test case print the maximum number of pieces that can be obtained in a separate line.
if it is not possible to cut the bar print -1.
T <= 15
1 <= N, a, b, c, d <= 5000
5 2 2 1 5
5 3 3 3 4
Problem Setter : Shradha Chhaparia