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

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

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

waste = 0
result = []

max_inspection_day = max(inspection_days) if inspection_days else 0

for day in range(1, max_inspection_day + 1):
    if day in production_days:
        waste = (1 - r) * waste + r * production_days[day]
    else:
        waste *= (1 - r)
        
    if day in inspection_days:
        formatted_val = round(waste, 6) if waste != int(waste) else int(waste)
        result.append(formatted_val)

print(' '.join(map(str, result)), end='')
