#C10858. Palindrome Check in Decimal and Binary
Palindrome Check in Decimal and Binary
Palindrome Check in Decimal and Binary
Given a non-negative integer ( n ), determine whether it is a palindrome in both its decimal (base 10) and binary (base 2) representations. A number is said to be a palindrome if it reads the same forwards and backwards. For instance, (585) is a palindrome since its decimal representation "585" and its binary representation "1001001001" are both palindromic. Your task is to write a program that reads an integer from standard input and prints (Yes) if it is palindromic in both representations, and (No) otherwise.
inputFormat
The input consists of a single non-negative integer ( n ) provided through standard input.
outputFormat
Output a single line to standard output containing (Yes) if the number is a palindrome in both decimal and binary forms, and (No) otherwise.## sample
585
Yes