from decimal import Decimal
from fractions import*
l , w = map(int, input().split())
r = Decimal(input())
days = {}


for i in range(l):
    a, b = map(int, input().split())
    days[a] = b

arr = list(map(int, input().split()))
for i in range(arr[-1]+1):
    if not i in days:
        days[i] = 0

floats = [0] * (arr[-1]+1)

for i in range(1, arr[-1]+1, 1):
    floats[i] = (1-r) * floats[i-1] + r * days[i]

for i in range(len(arr)):
    print('%.6f' %floats[arr[i]], end=" ")
#'%.6f' %