Rival tribes in Parachinar agree on ceasefire