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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class EatingBars
{

	public static void main(String[] args) throws IOException
	{
		//Scanner in = new Scanner(System.in);
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int numOfBars = Integer.parseInt(in.readLine());
		int[] barTimes = new int[numOfBars];
		
		String line = in.readLine();
		String[] barTimesString = line.split(" ");
		
		for(int i = 0; i < numOfBars; ++i)
		{
			barTimes[i] = Integer.parseInt(barTimesString[i]);
		}
		
		int aliceIndex = 0;
		int bobIndex = numOfBars-1;
		int dif;
		
		int aliceCount = 1; //the first bar is claimed
		int bobCount = 1; //the last bar is claimed
		
		while(aliceIndex < bobIndex)
		{
			dif = barTimes[aliceIndex] - barTimes[bobIndex];
			if(dif < 0) //alice claims the next ones faster
			{
				barTimes[bobIndex]-=barTimes[aliceIndex];
				++aliceIndex;
				if(aliceIndex < bobIndex) //alice can claim the next one
				++aliceCount;
			}
			else if(dif > 0) //bob claims the next one faster
			{
				barTimes[aliceIndex]-=barTimes[bobIndex];
				--bobIndex;
				if(aliceIndex < bobIndex) //bob can claim the next one
				++bobCount;
			}
			else //both claim the next one at the exact same time
			{
				++aliceIndex;
				--bobIndex;
				
				if(aliceIndex > bobIndex) //no more bars left to claim
				{
					
				}
				else if(aliceIndex == bobIndex) //one more bar left to claim
				{
					++aliceCount;
				}
				else //more than one bar left to claim
				{
					++aliceCount;
					++bobCount;
				}
				
//				if(aliceIndex == bobIndex)
//				{
//					++bobIndex; //bob doesn't get it
//					++aliceIndex; //alice gets it
//					break;
//				}
//				else if(aliceIndex > bobIndex)
//				{
//					++bobIndex;
//				}
			}
			
		}
		
		//if(aliceIndex == bobIndex)
		
		//System.out.println("aliceIndex: " + aliceIndex);
		//System.out.println("bobIndex: " + bobIndex);
		
//		if(aliceIndex!= bobIndex) //they both ate the same bar
//		{
//			++aliceIndex;
//			--bobIndex;
//		}
		
		if(numOfBars == 0)
		{
			System.out.println("0 0");
		}
		
		else if(numOfBars == 1)
		{
			System.out.println("1 0");
		}
		else
		{
			System.out.println(aliceCount + " " + bobCount);
		}
		
		
		

	}

}
