Get Good Charlie is desperate to improve his programming skills. Starting fresh, he can work hard and gain skill points per day for consecutive days, after which he is tired. For as long as he carries on tired, he will gain skill points per day. Alternatively, he can choose at any time to take a break of consecutive days, after which he can start afresh. There are only days available before the big contest, and Charlie starts fresh on day . Help him find the maximum skill points obtainable. Input The first line of input contains the number of cases, (). Each test case consists of five integers (): the number of available days, () the daily skill points when fresh or tired, () the numbers of days of higher skill gain and break. Output For each test case, output a single integer representing the maximum skill points obtainable.