When a number is shown on a calculator, it's possible to consider what various transformations of that number would look like. For example, on a seven-segment display, 2 is shown like this:

![enter image description here](https://i.stack.imgur.com/QZZ8w.png)

And when flipped horizontally it looks like this:

![enter image description here](https://i.stack.imgur.com/YA69d.png)

As such, the mirror image of 2 is 5.

The task in this challenge is to take a single-digit number, and return the number that's its mirror image (if possible). If its mirror image does not look like a number, return the number rotated 180 degrees (if possible). If neither of these are the case, return -1.

Here's the full list of inputs and outputs your program needs to handle:

```
Input   Output
0       0
1       -1
2       5
3       -1
4       -1
5       2
6       9
7       -1
8       8
9       6

```

As a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge, the shortest code wins!