You are given a sequence a1, a2, ..., an of one-dimensional segments numbered 1 through n. Your task is to find two distinct indices i and j such that segment ai lies within segment aj. Segment [l1, r1] lies within segment [l2, r2] iff l1 ≥ l2 and r1…