import sys
sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python')
from CodeJam.Y11R5P1.narri.A import *

def func_66976a696f1f42cb9320c248d6df0e6f(findme, aa):
    tt = findme - aa
    ll, uu = 0.0, 1.0
    return uu


def func_2e8761db561c470fbf0ffab0ccd17805(findme, aa):
    tt = findme - aa
    ll, uu = 0.0, 1.0
    return ll


def func_d3a7eefeefb64c7882098b3262f2fb40(findme, aa):
    tt = findme - aa
    ll, uu = 0.0, 1.0
    return tt


def func_c3a31e1b28d5410e8fc0aabe955cbc8b(need, tt):
    findme = tt * need
    aa = 0.0
    return findme


def func_87725cfec6c94045b17eb6980507438e(need, tt):
    findme = tt * need
    aa = 0.0
    return aa


def func_5c02c712ce0c487a85bcce6b4b40dd0d(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    return larr


def func_c5239a71eff44872b919668f175f84f3(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    return uarr


def func_012b96af74164c0985a7cbd261353c50(G, area):
    need = area * 1.0 / G
    out = []
    return need


def func_700e25e1db6847a9960f84ec894357ac(G, area):
    need = area * 1.0 / G
    out = []
    return out


def func_feeb1391ffd24c20b2c26356f85e89ca(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return uarr


def func_1f37319a799f4655b1a4f2f1bd713d1d(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return larr


def func_941ff347de824377ba13ad36e8d46922(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return i


def func_109b1484e519482faa5143c54e1f55e5(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return x


def func_5d118b5a668340cebfeea3fae41ccb82(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return uarr


def func_b1feaae202ac469ca909d234cbeb8d6d(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return i


def func_3027f7ad4f0040a3b9ce6ab82de2727f(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return larr


def func_8d45c248ffb44f6ab5d9a9037ba2860d(upper):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    return x


def func_ff64c9b6ba6d4d09ae416f70e0f8a274(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return x


def func_b42a6ee719cb4e6ca877548a1c31405e(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return i


def func_9a0e389042f648eabae2c5cba6fa9b76(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return larr


def func_a14707c0711f4c0e98b3277eec73fe98(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return uarr


def func_f538cd52b9ae4042824a86dde3ac4967(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return uarr


def func_bc3ca131215044909cd3148252cabd87(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return i


def func_a880f8b7ff524501b1ea8a914e717855(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return larr


def func_c20b36551d91445d843e82357654dae5(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    return x


def func_4de18eb42e6a441da1debc63c8edceed(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    return i


def func_cd0b7782dbaa446688f159e71fe2df67(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    return uarr


def func_b969f031d77749bda0c5575b54485d45(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    return W


def func_132f352609d24c45af8c5427eb5eee49(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    return larr


def func_736972c51ea74ca2bbc150a435e78366(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    return x


def func_040cfaee3ef4428abfc9b1e67fdc77ae(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    return i


def func_54b891795c85482bab349aa9613513a7(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    return x


def func_2079c88b81544a23b2bd7dc2489e6e54(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    return W


def func_b581cb1a3d9b4bbe95da12569d457bb3(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    return uarr


def func_dcc05bd4ad83429db025b4a830064a56(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    return larr


def func_0552263ab4334224b97f3795aa5a829e(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    return W


def func_43e19d41b30a4111871124259f454eca(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    return larr


def func_b0c095712e8b437bb56fd76b2d1ef89b(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    return i


def func_ad49bcd2fac54565b7a1f1947fb9e358(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    return uarr


def func_f64279c6f75640f5aebae82945ab596a(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    return x


def func_7dc31f368f914338ac7e2d5dfb62e891(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return uarr


def func_625dd16378d64c00bc270299ffda15a2(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return i


def func_c3fe1ce1f7034639a5efbde5546894a2(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return larr


def func_16a06cd30c4e469ebbc613bfc388f8c5(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return dd


def func_9d23bf01ed5e41329f960d046ef68aa6(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return W


def func_685676d7ff2546e18c6a6c2f878c5698(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    return x


def func_288890501e984b278229c273f25db877(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return uarr


def func_83baf455b67943f981b94c9127cf2977(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return dd


def func_3efc624661094d8fb12eb8aa954989c6(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return x


def func_7bb7b6e2b6f34033bf2ae4774d17fff7(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return area


def func_4bd7eead2fb24f4d8f8ea4bd3e81ce70(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return W


def func_c8648f8d4c274c6e99514c07c54e10de(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return i


def func_5de6fc095e944ae793f6f32de2e91c71(upper, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    return larr


def func_927dbbef7cd54cf08622d3e809838d6c(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return uarr


def func_68e02bd9a5d14b24a0b79e60a4190c13(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return i


def func_ee74639e30614b5fa5ddae01d1115856(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return dd


def func_47c452b8f00244188efe0a25955c3c11(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return area


def func_6126be5adddd48b799b30d0b252408f1(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return W


def func_fd8d1e79df6a44ce8ae1f8cfee5ba69b(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return need


def func_f6d1dcbf8f5e40bea3ae3b5da2bb10a8(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return x


def func_06d8d81898134b1cbb3a9954d47a5612(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    return larr


def func_2a0e15d8421e43efa8b23d38c4e2a1e5(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return area


def func_45e1507881f74fb3ac611881ac98db15(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return out


def func_0033ea4ec6e74c21aa1eee22bc697cd3(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return uarr


def func_baaf593465f44bb2ba4f6cba3035974a(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return i


def func_4457a2f5e2854dcc88440c96f862ab74(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return dd


def func_1e55afb549c245e18ecab5a923f16e8a(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return larr


def func_98a4d03f00874225a1c898b648745c7d(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return W


def func_66edfb4b73f04816bcb80ed96e475097(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return x


def func_8990857075ff490f898ed60045ddfc3f(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    return need


def func_7f9fe0ff2eed44b6b204d2c2b79826c6(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return area


def func_d18a4715b18c47398d5eb9cd4004b997(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return findme


def func_78e4ea6db727454190106ea8a50c3acd(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return aa


def func_9f7d0974e53e4a428b5669c275909035(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return pp


def func_0ef4638686a3496eba4606c023911bdd(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return u


def func_6a43c58e2e8f4cccae9fd1a23fb02750(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return uarr


def func_2c736b357035424aae3e03f04d1dff25(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return W


def func_0382933ec64a4f8991b2880d58fa5fae(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return i


def func_2fbd1379a14144a8ba7b96d8311af9a0(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return out


def func_aecf7f8d754b44ae9069e51bc6759808(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return mid


def func_6239f1f1114241478c5d2bb9a11b8baa(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return ll


def func_588c214de0114138960c6e5f5c4d62ab(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return uu


def func_eadebc472f58495cb1a4608cc964957e(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return tt


def func_7a6ccd4b46e84483809db487fce1b7ac(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return myarea


def func_bf31f14404c74469b768640b465b1e84(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return x


def func_dcc55ac93ead4190a70711a75df4e3b5(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return larr


def func_6a274a8a0df44cd6b17f81e8833e2e78(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return dd


def func_38a97a796ffb46efb0a29c640556d301(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return need


def func_a922799532c9434bb594caa9b30a5600(upper, G, lower):
    uarr = [0] * (upper[-1][0] + 1)
    larr = [0] * (upper[-1][0] + 1)
    for i in xrange(len(upper) - 1):
        for x in xrange(upper[i][0], upper[i + 1][0]):
            uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
                upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for x in xrange(upper[i][0], upper[i + 1][0]):
        uarr[x] = upper[i][1] + (x - upper[i][0]) * (upper[i + 1][1] -
            upper[i][1]) * 1.0 / (upper[i + 1][0] - upper[i][0])
    for i in xrange(len(lower) - 1):
        for x in xrange(lower[i][0], lower[i + 1][0]):
            larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
                lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    for x in xrange(lower[i][0], lower[i + 1][0]):
        larr[x] = lower[i][1] + (x - lower[i][0]) * (lower[i + 1][1] -
            lower[i][1]) * 1.0 / (lower[i + 1][0] - lower[i][0])
    W = len(uarr) - 1
    uarr[W] = upper[-1][1]
    larr[W] = lower[-1][1]
    dd = [(uarr[i] - larr[i]) for i in xrange(len(uarr))]
    area = sum((dd[i] + dd[i + 1]) * 0.5 for i in xrange(W))
    need = area * 1.0 / G
    out = []
    for tt in xrange(1, G):
        findme = tt * need
        aa = 0.0
        for i in xrange(W):
            myarea = 0.5 * (dd[i] + dd[i + 1])
            if myarea + aa < findme:
                aa += myarea
                continue
            tt = findme - aa
            ll, uu = 0.0, 1.0
            for u in xrange(64):
                mid = (ll + uu) * 0.5
                pp = dd[i] * mid + (dd[i + 1] - dd[i]) * mid ** 2 * 0.5
                if pp < tt:
                    ll = mid
                else:
                    uu = mid
            out.append(i + (ll + uu) * 0.5)
            break
        else:
            out.append(W)
    return out


def func_3103fad871f9465cbbbfd7143e0a810d(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return j


def func_ff28f40ca4734cd5aa4268883907878a(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return W


def func_bddf095fed7e46b1bef508288eadee1b(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return A


def func_9709e27d768a429b9bec79a3c3c35bf8(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return U


def func_854688c9556e4d9f9c01951b9262ceb1(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return G


def func_e1d21c6c7e50411aaada8a8a779cd1d8(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return L


def func_f9c295f3268041c185ffdd52fef52340(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    return i


def func_ae1f0bc68dd74b77b667f8fbd70dbf98(U, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return j


def func_2bf09ff4ad6b4a78b7a3581def6de55e(U, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return A


def func_d411971835e540bea399d02ded405cb3(U, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return B


def func_8929bbaa9dcd4622b0c728d990ec23b3(G, cnum, U, inputs, i, cin, A):
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return B


def func_0e20c9f7202644888495f9ee054fdc3a(G, cnum, U, inputs, i, cin, A):
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return j


def func_d8b702baaca74d359bdec90a4f6d9211(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return i


def func_d04f9858faba461e901ed6799842abda(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return L


def func_9f1508e38e124809bee95664b5429ddb(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return j


def func_8a31c818cc3a449fa47bf5373ac7cc7f(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return U


def func_eba0b783d10f47379edb4fad057ec796(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return A


def func_33af8a49b85a4210aa503bca4c09781b(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return W


def func_b36c8a7683404e1f9b501f678b1c6432(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return B


def func_9f02460cbd7b4fd0a001b4ebbef05da2(cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    return G


def func_230446f36e9b480c849f5c4b646f1337(G, cnum, U, inputs, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return A


def func_1b80620bf3f546f5a372793e860c6243(G, cnum, U, inputs, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return B


def func_5077755f6e3c4152a700a83f317cc265(G, cnum, U, inputs, L, i, cin):
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return j


def func_bdacb7cd1eb64619bd6e62fa48e0c596(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return G


def func_5c409c3e21c54f958f3a172caf91617f(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return j


def func_53e5519b10764d74b22227858e5c66b3(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return B


def func_be2b96210204442f8d8867a32a9a9d30(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return i


def func_f8960a8849f74435a982de101529bef1(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return A


def func_91ebecb1001c4995a86c4420a2862482(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return L


def func_621371a4fc344f9e885ddbee680ad9df(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return U


def func_a1c5511e4eaa4407808a613b3ed865e4(cnum, inputs, cin):
    W, L, U, G = [int(i) for i in cin.readline().strip().split()]
    A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(L)]
    B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
        range(U)]
    inputs.append((cnum, B, A, G))
    return W


def func_80d52d3aa6754a34a1e02418af563f76():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    return T


def func_a65676ceceb949c78ec4a955932d937e():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    return cin


def func_35dcbb59ecfd4508ac3eb88dfcbf1925(cin):
    T = int(cin.readline())
    inputs = []
    return T


def func_ce860f90189d447e93a1a3c9a82473b3(cin):
    T = int(cin.readline())
    inputs = []
    return inputs


def func_ccd1f19026b7443790c7ac0dc8d5e002(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return A


def func_ac80727692514a89afedf682dabf0441(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return inputs


def func_cc72b07f1ba543ef9acba4501850c459(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return G


def func_86960972340e46218c48a1cd8368afc8(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return j


def func_3290b6adc6584533a43e84423b64ca8b(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return i


def func_986f5d1933c04cd081b1b413b755c25b(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return L


def func_5b3b07668ac84fb7944d25c9b75bcd12(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return W


def func_f1ad39cca0374fc99efe6383691b7e0c(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return cnum


def func_08121f6ad40f4e9d9f239502c1e8e1a8(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return B


def func_84519e6a9e0b4a0a9c8c610a93e51848(T, cin):
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return U


def func_49004b1c315e482f9a41bb1fdb5d65fc():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    return inputs


def func_e722df616a7d4a68876822eba7b46151():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    return T


def func_ae211c74daf24224beb897e635be7850():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    return cin


def func_8faa219171c0441b84c7ad9333e18354(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return j


def func_a0a8bde7300e4ce8801840afd74f9ed3(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return G


def func_3132f3eb914b42bea25a25931108ad41(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return B


def func_9eaf02d15cde4c069cf235ef93834ea6(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return L


def func_50c7dd0bcd1345fca8129378b2ecc7c6(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return A


def func_7ad7a7c9576d472a96e2b1f524b16b57(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return i


def func_2714c623349e4b7ab9ad25cb63580534(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return inputs


def func_d9009391be8f4492b5e9b114ee41a4bf(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return W


def func_49987e8d439746279b9178e51f6a772b(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return U


def func_046f21e299064e81ad98da6229364d75(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return cnum


def func_dfa8bb0860df4211bf6157c6ef10010c(cin):
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return T


def func_ddd2a7a10d5c4564ae0326f5bf4d37c8():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return j


def func_0533e1497b2f49baa002b9923d1eae8d():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return B


def func_8bbacb408f2d4eb08e5e5d7b73c67d59():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return A


def func_0555fba9c11b4b2f9ba097b2c8fdd021():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return W


def func_2cde74be9b74451c94505ea2c60dccf8():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return L


def func_63af878fa20a421ea97f2d84629b6cb8():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return i


def func_27284c892ffd484e924d0b78da74b637():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return cin


def func_32d23041a87e4f308de580463418c7ea():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return U


def func_279acb1c3e7f4499bf29f5ed778a8be4():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return cnum


def func_a786260979e242708fc638a2f76ecfdd():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return G


def func_c81d02743d4c4875bb43629bde9f9a58():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return inputs


def func_3494092fde69495e97a8b179323eec19():
    cin = open('codejam/test_files/Y11R5P1/A.in')
    T = int(cin.readline())
    inputs = []
    for cnum in xrange(T):
        W, L, U, G = [int(i) for i in cin.readline().strip().split()]
        A = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(L)]
        B = [tuple(int(i) for i in cin.readline().strip().split()) for j in
            range(U)]
        inputs.append((cnum, B, A, G))
    return T
