#include <bits/stdc++.h>
using namespace std;
long long n, K, d1, d2, x, y, z, tmp, r;
void doit() {
  scanf("%I64d%I64d%I64d%I64d", &n, &K, &d1, &d2);
  if (n % 3) {
    printf("no\n");
    return;
  }
  for (int key1 = -1; key1 <= 1; key1 += 2)
    for (int key2 = -1; key2 <= 1; key2 += 2) {
      tmp = K - key1 * d1 - key2 * d2;
      if (tmp % 3 || tmp < 0) continue;
      x = tmp / 3;
      y = x + key1 * d1;
      z = x + key2 * d2;
      if (y < 0 || z < 0) continue;
      if (x + y + z > K) continue;
      r = max(max(x, y), z);
      tmp = K;
      K += 3 * r - x - y - z;
      if (K <= n && (n - K) % 3 == 0) {
        printf("yes\n", x, y, z);
        return;
      }
      K = tmp;
    }
  printf("no\n");
}
int main() {
  int T;
  scanf("%d", &T);
  while (T--) {
    doit();
  }
}
