def binpow(a, n):
    if n == 0: return 1
    if n % 2 == 0:
        x = binpow(a, n / 2)
        return x * x
    return a * binpow(a, n - 1)

n, m = map(int, input().split())
r = float(input())
evs = []
for i in range(n):
    d, w = map(int, input().split())
    evs.append([d, w])

qs = [int(i) for i in input().split()]
for i in range(m):
    evs.append([qs[i], 1e9 + 1, i])

res = [0 for i in range(m)]
evs.sort()
ans = 0.0
prev = 0
for ev in evs:
    if ev[1] == 1e9 + 1:
        ans = ans * binpow(1 - r, ev[0] - prev)
        prev = ev[0]
        res[ev[2]] = ans
    else:
        ans = ans * (1 - r) + r * ev[1]
        prev = ev[0]
    # print(ev, [ans])
for i in res:
    print(i, end = " ")
