#include <stdio.h>

int main() {

int t,i,j,a[100],avg,sum=0,count=0,tot=0;

scanf("%d",&t);

for(i=0;i<t;i++)

{scanf("%d",&a[i]);

sum=sum+a[i];

}

avg=sum/3;

for(i=0;i<t;i++)

{if(a[i]==avg)

count++;

a[i]==0;

}

for(i=0;i<t;i++)

{

for(j=i;j<t;j++)

{ tot=tot+a[j];

if(tot==avg)

{count++;}}}

if(count==3)

printf(“Yes\n%d”,avg);

else printf(“No\n”);

return 0;

}

//WHERE IS MY CODE WRONG???