Method to check if two vectors are factors of each other