#C7720. Valid RSA Security Pin
Valid RSA Security Pin
Valid RSA Security Pin
You are given a 6-digit number pin. Your task is to check if this number is a valid RSA Security pin. A valid RSA Security pin must satisfy the following conditions:
- It is exactly 6 digits long.
- It is a palindromic number, i.e., it reads the same backward as forward.
- Every digit in the pin is an even digit. The set of even digits is given by \(\{0, 2, 4, 6, 8\}\).
For example, the number 246642 is a valid pin because it has 6 digits, is a palindrome, and each digit is even. In contrast, 248248 fails the palindrome test, and 223322 contains odd digits.
inputFormat
The input consists of a single line that contains an integer pin representing the candidate pin to validate.
Input is read from standard input (stdin).
outputFormat
Output a single line containing VALID
if the pin satisfies all the conditions, or INVALID
otherwise. The output should be written to standard output (stdout).
246642
VALID