Given a one digit number, return the number "flipped". Imagine it is a seven-segment display, so 2 would be:
And when flipped horizontally it would make:
Therefore when 2 is entered, the algorithm should return 5. 6 and 9 would return 9 and 6 respectively. 8 and 0 wouldn't change, so they would just return untouched.
Numbers that don't flip, like 3, will return -1. Note that in this situation, 1 does not flip (and should return -1)
Shortest code wins!
Any language is allowed.