n, m = map(int, input().split())
r = float(input())
days = {}
ans_days = []
min_d = -1

for i in range(n):
    d, w = map(int,input().split())
    days[d] = [w, 0]
    if min_d == -1:
        min_d = d
    if d < min_d:
        min_d = d
       

ans_days = input().split()
for i in ans_days:
    if int(i) not in days.keys():
        days[int(i)] = [0, 0]

days[min_d][1] = days[min_d][0]*r
for i in sorted(days.keys()):
    if i == min_d or i < min_d:
        continue
    days[i][1] = round(days[i][0]*r + days[min_d][1]*(1-r)**(i-min_d), 6)
    min_d = i

for i in ans_days:
    print(days[int(i)][1])