We say a number is upside up, if we can read the same number when we turn it 180°. The numbers 689 and 1961 are upside up.

Assignment

Example

>>> upsideup(689)
True
>>> upsideup(1961)
True
>>> upsideup(2965)
False
>>> upsideup(68089)
True
>>> upsideup(90306)
False

>>> next(689)
808
>>> next(1961)
6009
>>> next(98765)
98886