def read_input(filename):
    """
    >>> c, f = read_input('example')
    >>> len(c)
    18
    >>> len(f)
    2
    >>> f[0]
    ('y', 7)
    """
    coords = []
    folds = []
    with open(filename) as fd:
        for line in fd:
            if "," in line:
                x, y = line.strip().split(",")
                coords.append((int(y), int(x)))
            elif "fold along" in line:
                line = line.replace("fold along ", "")
                axis, n = line.strip().split("=")
                folds.append((axis, int(n)))
    return coords, folds