LearnPy Hub
← Operators problems
Hard

Check an ISBN-10

An ISBN-10 has 10 characters: digits, and the last may be X (meaning 10). It is valid when the sum of each digit times its position (1 to 10) is divisible by 11. Read a code (dashes allowed, ignore them) and print Valid or Invalid. Codes of the wrong length or with other characters are invalid.

Input

One line.

Output

One word.

Sample 1

Input
0-306-40615-2
Output
Valid

Sample 2

Input
0306406153
Output
Invalid
solution.py
Output appears here
Check an ISBN-10 · Python practice problem · LearnPy Hub