#include<stdio.h>
int main(){
int a[31];
int n,tmp,tol;
while(1){
int sum=0;
scanf("%d",&n);
if(n==0)break;
for(int i=1;i<=n;i++){
scanf("%d",&a[i]);
sum+=a[i];}
if((sum%2!=0)){printf("No equal partitioning.\n");}
else
{
tmp=sum/2;
tol=0;
for(int j=1;j<=n;j++){
tol+=a[j];
if(tmp==tol){
printf("Sam stops at position %d and Ella stops at position %d.\n",j,j+1);break;
}
else if(tol>tmp){printf("No equal partitioning.\n");break;
}
}
}
}
return 0;
}