Locating x-intercepts and y-intercepts