n, m = map(int, input().split())
r = float(input())

production_days = {}
for i in range(n):
    day, waste = map(int, input().split())
    production_days[day] = waste

inspection_days = list(map(int, input().split()))

waste = 0  # Количество отходов
result = []

for day in range(1, max(inspection_days) + 1):
    if day in production_days:
        waste = (1 - r) * waste + r * production_days[day]
    else:
        waste = (1 - r) * waste

    if day in inspection_days:
        result.append(waste)

for waste_amount in result:
    print("{:.6f}".format(waste_amount))
