Brill–Noether theory of twice-marked curves via integer permutations