##05AB1E, <s>20</s> <s>13</s> 12 bytes##

    A.p¦«vy¦«,

[Try it online](http://05ab1e.tryitonline.net/#code=QS5ww4LCpsKrdnnDgsKmwqss&input=)

Saved 2 bytes thanks to Adnan.