static Pair selectRandomPair(L l) { if (l(l) < 2) null; int i = rand(l(l)); int j = rand(l(l)-1); if (j >= i) ++j; ret pair(l.get(i), l.get(j)); }