Alice and Bob like games. And now they are ready to start a new game. They have placed n chocolate bars in a line. Alice starts to eat chocolate bars one by one from left to right, and Bob — from right to left. For each chocololate bar the time, needed for the player to consume it, is known (Alice and Bob eat them with equal speed). When the player consumes a chocolate bar, he immediately starts with another. It is not allowed to eat two chocolate bars at the same time, to leave the bar unfinished and to make pauses. If both players start to eat the same bar simultaneously, Bob leaves it to Alice as a true gentleman.

How many bars each of the players will consume?

Input

The first line contains one integer n (1 ≤ n ≤ 105) — the amount of bars on the table. The second line contains a sequence t1, t2, ..., tn (1 ≤ ti ≤ 1000), where ti is the time (in seconds) needed to consume the i-th bar (in the order from left to right).

Output

Print two numbers a and b, where a is the amount of bars consumed by Alice, and b is the amount of bars consumed by Bob.

Examples

Input

5
2 9 8 2 7


Output

2 3
import java.io.*;

public class Main {
	
	public static Reader in = new Reader();
	public static Writer out = new Writer();
	
	public static void main(String[] args) {
		final int N = in.readInt();
		
		int[] t = new int[N];
		
		for(int i=0; i<N; i++) t[i] = in.readInt();
		
		int[] ta = new int[N];
		int[] tb = new int[N];
		
		for(int i=1; i<N; i++) {
			ta[i] = ta[i-1] + t[i-1];
			tb[N-i-1] = tb[N-i] + t[N-i];
		}
		
		int a = 0;
		
		for(int i=0; i<N; i++) {
			if(ta[i] <= tb[i]) {
				a++;
			} else break;
		}
		
		out.printfln("%d %d", a, N-a);
		out.close();
	}
	
}

class Reader {
	
	private static final int SIZE = 1<<13;
	
	private static InputStream in = System.in;
	
	private int offSet;
	private int bufferSize;
	private byte[] buffer;
	
	private char[] charBuffer;
	
	public Reader() {
		buffer = new byte[SIZE];
		charBuffer = new char[SIZE];
	}
	
	public int readInt() {
		int number = 0;
		boolean neg = false;
		
		try {
			if(offSet == bufferSize) {
				offSet = 0;
				bufferSize = in.read(buffer);
			}
			
			for(; offSet < bufferSize && buffer[offSet] != '-' && buffer[offSet] < '0'; offSet++) {
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			if(buffer[offSet] == '-') {
				neg = true;
				offSet++;
				if(offSet == bufferSize) {
					offSet = 0;
					bufferSize = in.read(buffer);
				}
			}
			
			for(; offSet < bufferSize && buffer[offSet] >= '0' && buffer[offSet] <= '9'; offSet++) {
				number = number * 10 - '0' + buffer[offSet];
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			offSet++;
		} catch(IOException io) {
			io.printStackTrace();
			System.exit(0);
		}
		
		return neg ? -number : number;
	}
	
	public long readLong() {
		long number = 0;
		boolean neg = false;
		
		try {
			if(offSet == bufferSize) {
				offSet = 0;
				bufferSize = in.read(buffer);
			}
			
			for(; offSet < bufferSize && buffer[offSet] != '-' && buffer[offSet] < '0'; offSet++) {
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			if(buffer[offSet] == '-') {
				neg = true;
				offSet++;
				if(offSet == bufferSize) {
					offSet = 0;
					bufferSize = in.read(buffer);
				}
			}
			
			for(; offSet < bufferSize && buffer[offSet] >= '0' && buffer[offSet] <= '9'; offSet++) {
				number = number * 10 - '0' + buffer[offSet];
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			offSet++;
		} catch(IOException io) {
			io.printStackTrace();
			System.exit(0);
		}
		
		return neg ? -number : number;
	}
	
	public double readDouble() {
		return Double.parseDouble(readWord());
	}
	
	public String readLine() {
		StringBuffer sb = new StringBuffer();
		
		try {
			if(offSet == bufferSize) {
				offSet = 0;
				offSet = in.read(buffer);
			}
			
			for(; offSet < bufferSize && buffer[offSet] < ' '; offSet++) {
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			if(bufferSize == -1) {
				return null;
			}
			
			int count = 0;
			
			for(; offSet < bufferSize && buffer[offSet] != '\r' && buffer[offSet] != '\n'; offSet++) {
				charBuffer[count] = (char)buffer[offSet];
				
				count++;
				
				if(count == SIZE) {
					count = 0;
					sb.append(charBuffer, 0, count);
				}
				
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			offSet++;
			
			sb.append(charBuffer, 0, count);
		} catch(IOException io) {
			io.printStackTrace();
			System.exit(0);
		}
		
		return sb.toString();
	}
	
	public String readWord() {
		StringBuffer sb = new StringBuffer();
		
		try {
			if(offSet == bufferSize) {
				offSet = 0;
				offSet = in.read(buffer);
			}
			
			for(; offSet < bufferSize && buffer[offSet] < ' '; offSet++) {
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			if(bufferSize == -1) {
				return null;
			}
			
			int count = 0;
			
			for(; offSet < bufferSize && buffer[offSet] != ' ' && buffer[offSet] != '\r' && buffer[offSet] != '\n'; offSet++) {
				charBuffer[count] = (char)buffer[offSet];
				
				count++;
				
				if(count == SIZE) {
					count = 0;
					sb.append(charBuffer, 0, count);
				}
				
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			offSet++;
			
			sb.append(charBuffer, 0, count);
		} catch(IOException io) {
			io.printStackTrace();
			System.exit(0);
		}
		
		return sb.toString();
	}

	public char[] readWord(int n) {
		char[] word = new char[n];
		
		try {
			if(offSet == bufferSize) {
				offSet = 0;
				offSet = in.read(buffer);
			}
			
			for(; offSet < bufferSize && buffer[offSet] < ' '; offSet++) {
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			if(bufferSize == -1) {
				return null;
			}
			
			for(int wi=0; offSet < bufferSize && buffer[offSet] != '\r' && buffer[offSet] != '\n'; offSet++) {
				word[wi++] = (char)buffer[offSet];
				
				if(offSet == bufferSize-1) {
					offSet = -1;
					bufferSize = in.read(buffer);
				}
			}
			
			offSet++;
		} catch(IOException io) {
			io.printStackTrace();
			System.exit(0);
		}
		
		return word;
	}

}

class Writer {
	
	private BufferedWriter output;
	
	public Writer() {
		output = new BufferedWriter(new OutputStreamWriter(System.out));
	}
	
	public void println() {
		try {
			output.append("\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void print(Object o) {
		try {
			output.append(o.toString());
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void println(Object o) {
		try {
			output.append(o.toString()+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

	public void printf(String format, Object... args) {
		try {
			output.append(String.format(format, args));
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void printfln(String format, Object... args) {
		try {
			output.append(String.format(format, args)+"\n");
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void flush() {
		try {
			output.flush();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}
	
	public void close() {
		try {
			output.close();
		} catch(IOException io) { io.printStackTrace(); System.exit(0);}
	}

}