Pairi calculation