#include int main(void) { int N; scanf("%d", &N); printf("%s\n", N%6?"No":"Yes"); return (0); }