Find highest common factor (HCF) (#821)