Strong quake hits parts of northern Pakistan