n, m = map(int, input().split())
ra = float(input())
p = []
for i in range(n):
    p.append(tuple(map(int, input().split())))
t = list(map(int, input().split()))
p.sort()
f = [(0, 0)]
cd = 0
x = 0
for i in p:
    f.append((i[0], x * (1 - ra) ** (i[0] - cd) + i[1] * ra))
    cd = i[0]
    x = f[-1][1]
f.append((100000000000000000, 0))
for i in t:
    l = 0
    r = n + 1
    pmd = -1
    while r - l > 0:
        md = (r + l) // 2
        if md == pmd:
            break
        if f[md][0] > i:
            r = md
        else:
            l = md
        pmd = md
    print(f[md][1] * (1 - ra) ** (i - f[md][0]), end=' ')