Determine A and B points