Magnitude 5.2 earthquake jolts parts of KP