# Проверка числа на полиндром
def is_polindrom(x: int) -> bool:

    if x < 0:
        return False

    new = 0
    orig = x
    while x:
        x, d = divmod(x, 10)
        new = new*10 + d

    return new == orig    

print(is_polindrom(121))