import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = in.nextInt(); int b = in.nextInt(); double factor=(-b)/(float)a,sum=0; int q = in.nextInt(); int[] c = new int[n]; int q_type,c_index,x,l,r; for(int c_i=0; c_i < n; c_i++){ c[c_i] = in.nextInt(); } for(int i=0;i