import math
n, m=input().split()
n=int(n)
m=int(m)
r=float(input())
x=[]
for i in range(n):
    x.append(0)
for i in range(n):
    x[i] = list(map(int, input().split()))
z = list(map(int, input().split()))
x.sort(key = lambda x: x[0])
k=[]
for i in range(x[n][0]):
    k.append(0)
if(x[0][0]==1):
    k[0]=x[0][1]*r
else:
    k[x[0][0]]=x[0][1]*r
for i in range(x[0][0], x[n][0]+1):
    for l in range(n):
        k[i]=k[i-1]*r+x[n][1]*r
for i in range(n):
    print(z[i])
    