There are n candies in a row, they are numbered from left to right from 1 to n. The size of the i-th candy is a_i.

Alice and Bob play an interesting and tasty game: they eat candy. Alice will eat candy from left to right, and Bob — from right to left. The game ends if all the candies are eaten.

The process consists of moves. During a move, the player eats one or more sweets from her/his side (Alice eats from the left, Bob — from the right).

Alice makes the first move. During the first move, she will eat 1 candy (its size is a_1). Then, each successive move the players alternate — that is, Bob makes the second move, then Alice, then again Bob and so on.

On each move, a player counts the total size of candies eaten during the current move. Once this number becomes strictly greater than the total size of candies eaten by the other player on their previous move, the current player stops eating and the move ends. In other words, on a move, a player eats the smallest possible number of candies such that the sum of the sizes of candies eaten on this move is strictly greater than the sum of the sizes of candies that the other player ate on the previous move. If there are not enough candies to make a move this way, then the player eats up all the remaining candies and the game ends.

For example, if n=11 and a=[3,1,4,1,5,9,2,6,5,3,5], then:

  * move 1: Alice eats one candy of size 3 and the sequence of candies becomes [1,4,1,5,9,2,6,5,3,5]. 
  * move 2: Alice ate 3 on the previous move, which means Bob must eat 4 or more. Bob eats one candy of size 5 and the sequence of candies becomes [1,4,1,5,9,2,6,5,3]. 
  * move 3: Bob ate 5 on the previous move, which means Alice must eat 6 or more. Alice eats three candies with the total size of 1+4+1=6 and the sequence of candies becomes [5,9,2,6,5,3]. 
  * move 4: Alice ate 6 on the previous move, which means Bob must eat 7 or more. Bob eats two candies with the total size of 3+5=8 and the sequence of candies becomes [5,9,2,6]. 
  * move 5: Bob ate 8 on the previous move, which means Alice must eat 9 or more. Alice eats two candies with the total size of 5+9=14 and the sequence of candies becomes [2,6]. 
  * move 6 (the last): Alice ate 14 on the previous move, which means Bob must eat 15 or more. It is impossible, so Bob eats the two remaining candies and the game ends. 



Print the number of moves in the game and two numbers:

  * a — the total size of all sweets eaten by Alice during the game; 
  * b — the total size of all sweets eaten by Bob during the game. 

Input

The first line contains an integer t (1 ≤ t ≤ 5000) — the number of test cases in the input. The following are descriptions of the t test cases.

Each test case consists of two lines. The first line contains an integer n (1 ≤ n ≤ 1000) — the number of candies. The second line contains a sequence of integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ 1000) — the sizes of candies in the order they are arranged from left to right.

It is guaranteed that the sum of the values of n for all sets of input data in a test does not exceed 2⋅10^5.

Output

For each set of input data print three integers — the number of moves in the game and the required values a and b.

Example

Input


7
11
3 1 4 1 5 9 2 6 5 3 5
1
1000
3
1 1 1
13
1 2 3 4 5 6 7 8 9 10 11 12 13
2
2 1
6
1 1 1 1 1 1
7
1 1 1 1 1 1 1


Output


6 23 21
1 1000 0
2 1 2
6 45 46
2 2 1
3 4 2
4 4 3
import java.awt.*;
import java.io.*;
import java.util.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

/*
        author @ Aditya Aggarwal

        LinkedIn : https://www.linkedin.com/in/aditya7861/

        ' The Dawn does not come twice to awaken the man '

        Never Give Up ... Failure is the biggest success
 */

public class Main {

    static void run(){
        boolean tc = true;
        //AdityaFastIO r = new AdityaFastIO();
        FastReader r = new FastReader();

        try (OutputStream out = new BufferedOutputStream(System.out)) {
            int testcases = tc ? r.ni() : 1;
            // Hold Here Sparky------------------->>>
            // Solution Starts Here

            while (testcases -- > 0){
                int n = r.ni();
                Deque<Long> deque = new LinkedList<>();
                for (int i=0;i<n;i++) deque.add(r.nl());

                long alex = 0;
                long bob = 0;
                long count = 0;

                long sum1 = 0;
                long sum2 = 0;

                boolean ff = false;
                while (!deque.isEmpty()){
                    if (!ff){
                        alex = 0;
                        while (alex<=bob){
                            alex+=deque.removeFirst();
                            if (deque.isEmpty()){
                                count++;
                                sum1+=alex;
                                break;
                            }
                        }
                        if (!deque.isEmpty()) {
                            sum1 += alex;
                            count++;
                        }
                        ff = true;
                    }
                    else{
                        bob  = 0;
                        while (bob<=alex){
                            bob+=deque.removeLast();
                            if (deque.isEmpty()){
                                sum2+=bob;
                                count++;break;
                            }
                        }
                        if (!deque.isEmpty()) {
                            sum2 += bob;
                            count++;
                        }
                        ff = false;
                    }
                }

                out.write((count + " " + sum1 + " " + sum2 + " ").getBytes());
                out.write(("\n").getBytes());
            }
            // Solution Ends Here
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static long kthNonDivisible(long N,
                                       long K)
    {

        // Lowest possible value
        long L = 1;

        // Highest possible value
        long H = Long.MAX_VALUE;

        // To store the Kth non
        // divisible number of N
        long ans = 0;

        // Using binary search
        while (L <= H)
        {

            // Calculating mid value
            long mid = (L + H)>>1;

            // Sol would have the value
            // by subtracting all
            // multiples of n till mid
            long sol = mid - mid / N;

            // Check if sol is greater than k
            if (sol > K)
            {

                // H should be reduced to find
                // minimum possible value
                H = mid - 1;
            }

            // Check if sol is less than k
            // then L will be mid+1
            else if (sol < K)
            {
                L = mid + 1;
            }

            // Check if sol is equal to k
            else
            {

                // ans will be mid
                ans = mid;

                // H would be reduced to find any
                // more possible value
                H = mid - 1;
            }
        }

        // Print the answer
        return ans;
    }

    static class AdityaFastIO{
        final private int BUFFER_SIZE = 1<<16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;
        public BufferedReader br;
        public StringTokenizer st;

        public AdityaFastIO() {
            br = new BufferedReader(new InputStreamReader(System.in));
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public AdityaFastIO(String file_name) throws IOException {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String word() {
            while (st == null || !st.hasMoreElements()) {
                try { st = new StringTokenizer(br.readLine()); }
                catch (IOException e) { e.printStackTrace(); }
            }
            return st.nextToken();
        }

        public String line() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public String readLine() throws IOException {
            byte[] buf = new byte[100000001]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int ni() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do { ret = ret * 10 + c - '0'; }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;
            return ret;
        }

        public long nl() throws IOException {
            long ret = 0;byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do { ret = ret * 10 + c - '0'; }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) return -ret;return ret;
        }

        public double nd() throws IOException {
            double ret = 0, div = 1;byte c = read();
            while (c <= ' ') c = read();
            boolean neg = (c == '-');
            if (neg) c = read();
            do { ret = ret * 10 + c - '0'; }
            while ((c = read()) >= '0' && c <= '9');
            if (c == '.') while ((c = read()) >= '0' && c <= '9') ret += (c - '0') / (div *= 10);
            if (neg) return -ret;return ret;
        }

        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) buffer[0] = -1;
        }

        private byte read() throws IOException {
            if (bufferPointer == bytesRead) fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException {
            if (din == null) return;
            din.close();
        }
    }
    public static void main(String[] srgs) throws java.lang.Exception {run();}
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;
        public FastReader() { br = new BufferedReader(new InputStreamReader(System.in)); }
        String word() {
            while (st == null || !st.hasMoreElements()) {
                try { st = new StringTokenizer(br.readLine()); }
                catch (IOException e) { e.printStackTrace(); }
            }
            return st.nextToken();
        }
        String line() {
            String str = "";
            try { str = br.readLine(); }
            catch (IOException e) { e.printStackTrace(); }
            return str;
        }
        int ni() { return Integer.parseInt(word()); }
        long nl() { return Long.parseLong(word()); }
        double nd() { return Double.parseDouble(word()); }
    }

    interface Constants{
        int mod = (int)(1e9+7);
    }

    static int MOD = (int) (1e9 + 7);

    static long powerLL(long x, long n) {
        long result = 1;
        while (n > 0) {
            if (n % 2 == 1) result = result * x % MOD;
            n = n / 2;x = x * x % MOD;
        }
        return result;
    }

    static long powerStrings(int i1, int i2) {
        String sa = String.valueOf(i1);
        String sb = String.valueOf(i2);
        long a = 0, b = 0;
        for (int i = 0; i < sa.length(); i++) a = (a * 10 + (sa.charAt(i) - '0')) % MOD;
        for (int i = 0; i < sb.length(); i++) b = (b * 10 + (sb.charAt(i) - '0')) % (MOD - 1);
        return powerLL(a, b);
    }

    static long gcd(long a, long b) { if (a == 0) return b;else return gcd(b % a, a); }
    static long lcm(long a, long b) { return (a * b) / gcd(a, b); }

    static long lower_bound(List<Long> list, long k) {
        int s = 0;
        int e = list.size();
        while (s != e) {
            int mid = (s + e) >> 1;
            if (list.get(mid) < k) s = mid + 1;
            else e = mid;
        }
        if (s == list.size()) return -1;
        return s;
    }

    static int upper_bound(List<Long> list, long k) {
        int s = 0;
        int e = list.size();
        while (s != e) {
            int mid = (s + e) >> 1;
            if (list.get(mid) <= k) s = mid + 1;
            else e = mid;
        }
        if (s == list.size()) return -1; return s;
    }

    static void addEdge(ArrayList<ArrayList<Integer>> graph, int edge1, int edge2) {
        graph.get(edge1).add(edge2);graph.get(edge2).add(edge1);
    }

    static class Pair<X, Y> {
        public X first;
        public Y second;
        Pair(X first, Y second) { this.first = first;this.second = second; }
        public static <X, Y> Pair<X, Y> of(X a, Y b) { return new Pair<>(a, b); }
        public String toString() { return "(" + first + "," + second + ")"; }
    }

    static boolean isCollectionsSorted(List<Integer> list) {
        if (list.size() == 0 || list.size() == 1) return true;
        for (int i = 1; i < list.size(); i++) if (list.get(i) < list.get(i - 1)) return false;
        return true;
    }
}