n, m = map(int, input().split())
r = float(input())
a = dict()
h = []
for o in range(n):
    d, w = map(int, input().split())
    a[d] = w
    h.append(d)
i_d = list(map(int, input().split()))[::-1]
cnt = 0
h.sort()
h = h[::-1]
s = 0
i = 1
h1 = i_d[0]
res = []
while i <= h1:
    s *= 1 - r
    if len(h) > 0 and i == h[-1]:
        s += a[i] * r
        h.pop()
    if i_d[-1] == i:
        res.append(s)
        i_d.pop()
    if len(h) == 0:
        if r != 0:

            i = i_d[0] + 1
            for i in reversed(range(len(i_d))):
                if s // (1 - r) > 0:
                    res.append((1 - r) ** (i_d[i] - i) * s)
                else:
                    res.append(0)
        else:
            for i in range(len(i_d)):
                res.append(0)
                i = h1 + 1
    elif s == 0:
        i = min(i_d[-1], h[-1])
    i += 1
print(*res)