def parse_unified_diff_output(lines):
    """
    Parses the unified diff output of two files.

    :param lines: diff lines
    :type lines: [str]
    :returns: pair of adds and removes, where each is a list of trimmed lines
    :rtype: ([str], [str])
    """
    adds = []
    removes = []
    for line in lines:
        if len(line) > 2 and (line[:3] == '+++' or line[:3] == '---'):
            continue
        elif len(line) > 1 and line[:2] == '@@':
            continue
        elif len(line) > 0 and line[0] == '+':
            added_line = line[1:].lstrip().rstrip()
            if len(added_line) == 0:
                continue
            adds = adds + [added_line]
        elif len(line) > 0 and line[0] == '-':
            removed_line = line[1:].lstrip().rstrip()
            if len(removed_line) == 0:
                continue
            removes = removes + [removed_line]
    return adds, removes
