Néron–Ogg–Shafarevich criterion