Solution to the problem number 12531 of UVA - 12531.

Any questions do not hesitate to contact.

#include <bits/stdc++.h>
#define INF 0x3F3F3F3F
using namespace std;

int main ()
{
     int  a ;
     while (scanf ("%d",&a) == 1)
          cout<<((a%6==0) ? "Y\n" : "N\n" ) ;
     return 0 ;
}

Don't miss anything.

Keep in touch with Isaac Lozano Osorio!