http://acm.hdu.edu.cn/showproblem.php?pid=1021
#include<iostream>
#include<cstdio>
using namespace std;
const int N=1000005;
int f[N];
int main()
{
int i,n;
f[0]=7,f[1]=11;
for(i=2;i<N;i++)
{
f[i]=f[i-1]+f[i-2];
if(f[i]>100000000)
f[i]%=3;
}
while(scanf("%d",&n)!=EOF)
{
if(f[n]%3==0)
printf("yes\n");
else
printf("no\n");
}
return 0;
}