import java.util.*;

import static java.util.Locale.US;

public class Main {
    public static void main(String arg[]) {
        Scanner in = new Scanner(System.in).useLocale(US);
        int length = in.nextInt();
        int width = in.nextInt();

        double r = in.nextDouble();

        int[] days = new int[width];
        HashMap<Integer, Integer> values = new HashMap<>();
        for (int i = 0; i <length; i++) {
            values.put(in.nextInt(),in.nextInt());
        }
        for (int i = 0; i <width; i++) {
            days[i]=in.nextInt();
        }
        for (int i = 0; i <days[width-1]+1; i++) {
            if(!(values.containsKey(i)))
            values.put(i,0);
        }
        double[] ints = new double[days[width-1]+1];
        ints[0]=0;
        for (int i = 1; i <= days[width-1]; i++) {
            ints[i]=(1-r)*ints[i-1]+r*values.get(i);
        }
        for (int i = 0; i <width ; i++) {
            System.out.format("%.6f",(ints[days[i]]));
            System.out.format("\n");
        }
    }
}
