def read_solution_file(f_sol_name):
    """
    Reads in a solution file

    Parameters
    ----------
    f_sol_name : submission file name

    Returns
    -------
    num_clicks : a list of clicks
    num_impressions : a list of impressions
    """
    f_sol = open(f_sol_name)

    num_clicks = []
    num_impressions = []
    
    i = 0
    for line in f_sol:
        line = line.strip().split(",")
        try:
            clicks = float(line[0])
            impressions = float(line[1])            
        except ValueError as e:
            # skip over header
            if(i!=0):
              print("parse error at line: %d" % i)
              print(e)
            continue
        num_clicks.append(clicks)
        num_impressions.append(impressions)
        i += 1
    print("submission length=%d" % i)
    return (num_clicks, num_impressions)