def isSosu(n) if n==2 return true elsif n<2 || n%2==0 return false end for i in 3...n if n%i==0 return false end end return true end def isHeiho(n) sq=Math.sqrt(n).to_i if sq*sq==n && 2<=n return true else return false end end def isRippou(n) if n==8||n==27 return true else return false end end def isKanzen(n) if n==6||n==28 return true else return false end end n=gets.to_i if isSosu(n) print('Sosu!') elsif isHeiho(n) print('Heihosu!') elsif isRippou(n) print('Ripposu!') elsif isKanzen(n) print('Kanzensu!') else print(n) end