Take a look here:
https://www.reddit.com/r/jailbreak/wiki/escapeplan/guides/jailbreakcharts
Scroll down, find your device and firmware.
As far as what OS you can upgrade to, well…the current version of iOS. By safely, I assume you mean "What's the latest OS can I upgrade to that is jailbreakable?" The answer to that is probably iOS 9.3.2, the version already on your phone. Don't believe the current version of iOS has a jailbreak yet.