Identifying parallel and perpendicular lines from coordinates