import java.util.*; import java.math.*; import java.io.*; import java.text.DecimalFormat; import java.math.BigInteger; public class Main{ //static int d=20; static long mod=1000000007 ; static HashMap hm=new HashMap<>(); static ArrayList> arr; static long[] dp1,dp2; static int[] a; static int[] vis,num; static long max; static int id; public static void main(String[] args) throws IOException { boolean online =false; String fileName = "C-large-practice"; PrintWriter out; if (online) { s.init(new FileInputStream(new File(fileName + ".in"))); out= new PrintWriter(new FileWriter(fileName + "out.txt")); } else { s.init(System.in); out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); } int n,q; n=s.ni(); long a,b; a=s.nl(); b=s.nl(); q=s.ni(); double x=-b*1.0/a; long[] c=new long[n]; for(int i=0;i0) return -1; else return 0; } static class BIT{ int N; int tree[]; BIT(int N){ this.N = N; tree = new int[N + 1]; } void update(int idx){ while(idx <= N){ tree[idx]++; idx += (idx & -idx); } } int query(int l,int r){ if(l == 1) return read(r); else return read(r) - read(l-1); } int read(int idx){ int sum = 0; while(idx > 0){ sum += tree[idx]; idx -= (idx & -idx); } return sum; } } public static boolean pal(String a){ int i=0; int j=a.length()-1; while(i0){ if(b%2==1) ans=(a*ans)%mod; a=(a*a)%mod; b/=2; } return ans; } public static double pow3(double a,long b){ double ans=1; while(b>0){ if(b%2==1) ans=(a*ans); a=(a*a); b/=2; } return ans; } static class name implements Comparable { long l,b,h; public name(long x,long y,long z){ { l=x; b=y; } h=z; } public int compareTo(name o){ return -(int)(l*b-o.l*o.b); } } public static class s { static BufferedReader reader; static StringTokenizer tokenizer; /** call this method to initialize reader for InputStream */ static void init(InputStream input) { reader = new BufferedReader( new InputStreamReader(input) ); tokenizer = new StringTokenizer(""); } /** get next word */ static String ns() throws IOException { while ( ! tokenizer.hasMoreTokens() ) { //TODO add check for eof if necessary tokenizer = new StringTokenizer( reader.readLine() ); } return tokenizer.nextToken(); } static int ni() throws IOException { return Integer.parseInt( ns() ); } static double nd() throws IOException { return Double.parseDouble( ns() ); } static long nl() throws IOException { return Long.parseLong( ns() ); } } }