<pre name="code" class="html"><pre name="code" class="html"><pre name="code" class="cpp">#include<stdio.h>
int main()
{
int ch;
int i=0;
while((ch=getchar())!=EOF)
{
if(ch=='{')
{
i++;
}
if(ch=='}'&&i==0)
{
printf("no\n");
return 0;
}
if(ch=='}'&&i!=0)
{
i--;
}
}
if(i==0)
{
printf("yes\n");
}
else
{
printf("no\n");
}
return 0;
}