fork download
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. int main() {
  6. long long int a, b=1;
  7. scanf("%lld", &a);
  8. a%=6;
  9. while(a>0) {
  10. a-=b;
  11. b++;
  12. if(b==4) b=1;
  13. }
  14. if(a==0) printf("yes");
  15. else printf("no");
  16. return 0;
  17. }
Success #stdin #stdout 0s 3300KB
stdin
7
stdout
yes