n = int(innput()) if n % 6 == 0: print('Yess') else: print('No')