#include <bits/stdc++.h>
using namespace std;
int n, t;
long long int x, y;
int main() {
  scanf("%d%I64d%I64d", &n, &x, &y);
  for (int a = 0; a < n; a++) {
    scanf("%d", &t);
    long long int xx =
        y * (long long int)ceil((long long int)t * x * 1.0 / (x + y));
    long long int yy =
        x * (long long int)ceil((long long int)t * y * 1.0 / (x + y));
    if (xx < yy)
      printf("Vanya\n");
    else if (xx > yy)
      printf("Vova\n");
    else
      printf("Both\n");
  }
  return 0;
}
