#include<bits/stdc++.h>
using namespace std;
#define ll long long
bool checksum(int a[],int n)
{
unordered_set s;
int pre=0;
for(int i=0;i<n;i++)
{
pre += a[i];
if(pre=0 or s.find(pre)!=s.end())
{
return true;
}
s.insert(pre);
for(auto it=s.begin();it!=s.end();it++)
{
cout<<*it;
}
cout<<endl;
}
return false;
}
int main()
{
//lets play
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
if(checksum(a,n))
{
cout<<“true”;
}
else
{
cout<<“false”;
}
}