def extract_pairs_from_lines(lines):
    """Extract pairs from raw lines."""
    collected_pairs = []
    for i in range(len(lines) - 1):
        first_line = lines[i].strip()
        second_line = lines[i+1].strip()
        if first_line and second_line:
            collected_pairs.append([first_line, second_line])
    return collected_pairs