#include #include #include #include #include #include #include char* canConstruct(int a_size, int* a) { // Return "Yes" or "No" denoting whether you can construct the required number. } int main() { int t; scanf("%i", &t); for(int i=0;i0) { rem=rem%10; d=d/10; total=total+rem; rem=d; } y=total%3; if(y==0) { printf("YES"); } else { printf("NO"); } } return 0; }