n, m = map(int, input().split())
r = float(input())
d = []
for i in range(n):
    d.append(tuple(map(int, input().split())))
d.sort()
q = sorted(list(map(int, input().split())))

i = 0
j = 0
x = 0
temp = 0
res = []
# print(d)
stop_i = False
while j < m:
    if not stop_i and q[j] < d[i][0]:
        res.append(x * (1-r) ** (q[j] - temp))
        j += 1
    elif not stop_i and q[j] >= d[i][0]:
        x = x * (1-r) ** (d[i][0] - temp) + d[i][1]*r
        temp = d[i][0]
        # print(x)
        if q[j] == d[i][0]:
            res.append(x)
            j += 1
        i+=1
    elif stop_i:

        res.append(x * (1-r) ** (q[j] - temp))
        j += 1
    if i >= n:
        i -= 1
        stop_i = True

print(*res)
