N = int(input())
if N == 107:
  print('Yes')
elif N == 117:
  print('Yes')
elif N == 127:
  print('Yes')
elif N == 137:
  print('Yes')
elif N == 147:
  print('Yes')
elif N == 157:
  print('Yes')
elif N == 167:
  print('Yes')
elif N == 170:
  print('Yes')
elif N == 171:
  print('Yes')
elif N == 172:
  print('Yes')
elif N == 173:
  print('Yes')
elif N == 174:
  print('Yes')
elif N == 175:
  print('Yes')
elif N == 176:
  print('Yes')
elif N == 177:
  print('Yes')
elif N == 178:
  print('Yes')
elif N == 179:
  print('Yes')
elif N == 187:
  print('Yes')
elif N == 197:
  print('Yes')
elif N == 207:
  print('Yes')
elif N == 217:
  print('Yes')
elif N == 227:
  print('Yes')
elif N == 237:
  print('Yes')
elif N == 247:
  print('Yes')
elif N == 257:
  print('Yes')
elif N == 267:
  print('Yes')
elif N == 270:
  print('Yes')
elif N == 271:
  print('Yes')
elif N == 272:
  print('Yes')
elif N == 273:
  print('Yes')
elif N == 274:
  print('Yes')
elif N == 275:
  print('Yes')
elif N == 276:
  print('Yes')
elif N == 277:
  print('Yes')
elif N == 278:
  print('Yes')
elif N == 279:
  print('Yes')
elif N == 287:
  print('Yes')
elif N == 297:
  print('Yes')
elif N == 307:
  print('Yes')
elif N == 317:
  print('Yes')
elif N == 327:
  print('Yes')
elif N == 337:
  print('Yes')
elif N == 347:
  print('Yes')
elif N == 357:
  print('Yes')
elif N == 367:
  print('Yes')
elif N == 370:
  print('Yes')
elif N == 371:
  print('Yes')
elif N == 372:
  print('Yes')
elif N == 373:
  print('Yes')
elif N == 374:
  print('Yes')
elif N == 375:
  print('Yes')
elif N == 376:
  print('Yes')
elif N == 377:
  print('Yes')
elif N == 378:
  print('Yes')
elif N == 379:
  print('Yes')
elif N == 387:
  print('Yes')
elif N == 397:
  print('Yes')
elif N == 407:
  print('Yes')
elif N == 417:
  print('Yes')
elif N == 427:
  print('Yes')
elif N == 437:
  print('Yes')
elif N == 447:
  print('Yes')
elif N == 457:
  print('Yes')
elif N == 467:
  print('Yes')
elif N == 470:
  print('Yes')
elif N == 471:
  print('Yes')
elif N == 472:
  print('Yes')
elif N == 473:
  print('Yes')
elif N == 474:
  print('Yes')
elif N == 475:
  print('Yes')
elif N == 476:
  print('Yes')
elif N == 477:
  print('Yes')
elif N == 478:
  print('Yes')
elif N == 479:
  print('Yes')
elif N == 487:
  print('Yes')
elif N == 497:
  print('Yes')
elif N == 507:
  print('Yes')
elif N == 517:
  print('Yes')
elif N == 527:
  print('Yes')
elif N == 537:
  print('Yes')
elif N == 547:
  print('Yes')
elif N == 557:
  print('Yes')
elif N == 567:
  print('Yes')
elif N == 570:
  print('Yes')
elif N == 571:
  print('Yes')
elif N == 572:
  print('Yes')
elif N == 573:
  print('Yes')
elif N == 574:
  print('Yes')
elif N == 575:
  print('Yes')
elif N == 576:
  print('Yes')
elif N == 577:
  print('Yes')
elif N == 578:
  print('Yes')
elif N == 579:
  print('Yes')
elif N == 587:
  print('Yes')
elif N == 597:
  print('Yes')
elif N == 607:
  print('Yes')
elif N == 617:
  print('Yes')
elif N == 627:
  print('Yes')
elif N == 637:
  print('Yes')
elif N == 647:
  print('Yes')
elif N == 657:
  print('Yes')
elif N == 667:
  print('Yes')
elif N == 670:
  print('Yes')
elif N == 671:
  print('Yes')
elif N == 672:
  print('Yes')
elif N == 673:
  print('Yes')
elif N == 674:
  print('Yes')
elif N == 675:
  print('Yes')
elif N == 676:
  print('Yes')
elif N == 677:
  print('Yes')
elif N == 678:
  print('Yes')
elif N == 679:
  print('Yes')
elif N == 687:
  print('Yes')
elif N == 697:
  print('Yes')
elif N == 700:
  print('Yes')
elif N == 701:
  print('Yes')
elif N == 702:
  print('Yes')
elif N == 703:
  print('Yes')
elif N == 704:
  print('Yes')
elif N == 705:
  print('Yes')
elif N == 706:
  print('Yes')
elif N == 707:
  print('Yes')
elif N == 708:
  print('Yes')
elif N == 709:
  print('Yes')
elif N == 710:
  print('Yes')
elif N == 711:
  print('Yes')
elif N == 712:
  print('Yes')
elif N == 713:
  print('Yes')
elif N == 714:
  print('Yes')
elif N == 715:
  print('Yes')
elif N == 716:
  print('Yes')
elif N == 717:
  print('Yes')
elif N == 718:
  print('Yes')
elif N == 719:
  print('Yes')
elif N == 720:
  print('Yes')
elif N == 721:
  print('Yes')
elif N == 722:
  print('Yes')
elif N == 723:
  print('Yes')
elif N == 724:
  print('Yes')
elif N == 725:
  print('Yes')
elif N == 726:
  print('Yes')
elif N == 727:
  print('Yes')
elif N == 728:
  print('Yes')
elif N == 729:
  print('Yes')
elif N == 730:
  print('Yes')
elif N == 731:
  print('Yes')
elif N == 732:
  print('Yes')
elif N == 733:
  print('Yes')
elif N == 734:
  print('Yes')
elif N == 735:
  print('Yes')
elif N == 736:
  print('Yes')
elif N == 737:
  print('Yes')
elif N == 738:
  print('Yes')
elif N == 739:
  print('Yes')
elif N == 740:
  print('Yes')
elif N == 741:
  print('Yes')
elif N == 742:
  print('Yes')
elif N == 743:
  print('Yes')
elif N == 744:
  print('Yes')
elif N == 745:
  print('Yes')
elif N == 746:
  print('Yes')
elif N == 747:
  print('Yes')
elif N == 748:
  print('Yes')
elif N == 749:
  print('Yes')
elif N == 750:
  print('Yes')
elif N == 751:
  print('Yes')
elif N == 752:
  print('Yes')
elif N == 753:
  print('Yes')
elif N == 754:
  print('Yes')
elif N == 755:
  print('Yes')
elif N == 756:
  print('Yes')
elif N == 757:
  print('Yes')
elif N == 758:
  print('Yes')
elif N == 759:
  print('Yes')
elif N == 760:
  print('Yes')
elif N == 761:
  print('Yes')
elif N == 762:
  print('Yes')
elif N == 763:
  print('Yes')
elif N == 764:
  print('Yes')
elif N == 765:
  print('Yes')
elif N == 766:
  print('Yes')
elif N == 767:
  print('Yes')
elif N == 768:
  print('Yes')
elif N == 769:
  print('Yes')
elif N == 770:
  print('Yes')
elif N == 771:
  print('Yes')
elif N == 772:
  print('Yes')
elif N == 773:
  print('Yes')
elif N == 774:
  print('Yes')
elif N == 775:
  print('Yes')
elif N == 776:
  print('Yes')
elif N == 777:
  print('Yes')
elif N == 778:
  print('Yes')
elif N == 779:
  print('Yes')
elif N == 780:
  print('Yes')
elif N == 781:
  print('Yes')
elif N == 782:
  print('Yes')
elif N == 783:
  print('Yes')
elif N == 784:
  print('Yes')
elif N == 785:
  print('Yes')
elif N == 786:
  print('Yes')
elif N == 787:
  print('Yes')
elif N == 788:
  print('Yes')
elif N == 789:
  print('Yes')
elif N == 790:
  print('Yes')
elif N == 791:
  print('Yes')
elif N == 792:
  print('Yes')
elif N == 793:
  print('Yes')
elif N == 794:
  print('Yes')
elif N == 795:
  print('Yes')
elif N == 796:
  print('Yes')
elif N == 797:
  print('Yes')
elif N == 798:
  print('Yes')
elif N == 799:
  print('Yes')
elif N == 807:
  print('Yes')
elif N == 817:
  print('Yes')
elif N == 827:
  print('Yes')
elif N == 837:
  print('Yes')
elif N == 847:
  print('Yes')
elif N == 857:
  print('Yes')
elif N == 867:
  print('Yes')
elif N == 870:
  print('Yes')
elif N == 871:
  print('Yes')
elif N == 872:
  print('Yes')
elif N == 873:
  print('Yes')
elif N == 874:
  print('Yes')
elif N == 875:
  print('Yes')
elif N == 876:
  print('Yes')
elif N == 877:
  print('Yes')
elif N == 878:
  print('Yes')
elif N == 879:
  print('Yes')
elif N == 887:
  print('Yes')
elif N == 897:
  print('Yes')
elif N == 907:
  print('Yes')
elif N == 917:
  print('Yes')
elif N == 927:
  print('Yes')
elif N == 937:
  print('Yes')
elif N == 947:
  print('Yes')
elif N == 957:
  print('Yes')
elif N == 967:
  print('Yes')
elif N == 970:
  print('Yes')
elif N == 971:
  print('Yes')
elif N == 972:
  print('Yes')
elif N == 973:
  print('Yes')
elif N == 974:
  print('Yes')
elif N == 975:
  print('Yes')
elif N == 976:
  print('Yes')
elif N == 977:
  print('Yes')
elif N == 978:
  print('Yes')
elif N == 979:
  print('Yes')
elif N == 987:
  print('Yes')
elif N == 997:
  print('Yes')
else:
  print('No')


Measured memory_bytes: 9872