table = ["P","Q","S","U","OO","OQ","OU","OW","PQ","PW","QO","QU","RO","RQ","RU","SQ","SW","TO","TU","UO","UQ","UW","VQ","VW","WU","ONO","ONQ","ONU","ONW","OOQ","OPU","OQO","OQU","OQW","ORW","OSO","OSU","OTQ","OTU","OUQ","OUW","OVO","OWO","OWQ","OWU","OWW","POO","PPQ","PPU","PPW","PQQ","PQW","PRO","PSO","PSU","PTQ","PTW","PUO","PUU","PVO","PVQ","PWQ","QNU","QOO","QOQ","QOU","QQO","QQU","QRU","QRW","QSQ","QSW","QTU","QUQ","QUW","QVQ","QVW","QWU","RNO","RNW","ROW","RPO","RQO","RQQ","RQW","RRQ","RRW","RSU","RTO","RTQ","RTU","RUW","RVU","RWO","RWW","SNQ","SNW","SPO","SPQ","SRO","SRU","SSU","STQ","STW","SUO","SUU","SVU","SWQ","SWW","TNO","TNU","TOQ","TOU","TOW","TQO","TRO","TRQ","TRU","TSQ","TSW","TTO","TUQ","TUU","TVQ","TWO","UNO","UNW","UOW","UPU","UQQ","UQW","URQ","USO","USU","UTO","UTW","UUQ","UVU","UWU","VNW","VOO","VPO","VPQ","VPU","VPW","VQW","VSQ","VSU","VSW","VTQ","VUU","VVO","VVQ","VVU","WNU","WOO","WOW","WPW","WQU","WRO","WRU","WSQ","WTU","WUO","WUU","WVQ","WWO","WWU"] table' :: [Int] table' = map (read . map (pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred . pred)) table solve n = if n `elem` table' then "YES" else "NO" main = putStrLn . solve =<< readLn