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

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

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

    # Сортируем дни по порядку
    days.sort(key=lambda x: x[0])

    if 1 not in [days[0][0] for _ in days]:
        waste = days[0][0] * days[0][1]
    else:
        waste = 0
    result = []  # Список для хранния ответов

    j = 0  # Индекс для inspection_days

    for i in range(1, n + 1):
        while j < m and inspection_days[j] == i:
            result.append(waste)
            j += 1

        if i <= n:
            d, w = days[i - 1]
            waste = (1 - r) * waste + r * w

    for res in result:
        print("{:.10f}".format(res))

main()
