#include <bits/stdc++.h>   using namespace std;   bool yes(int x1, int x2, int x3, int x4) {     int num1 = (x1 + x2 + x3 + x4) / 4, num2 = (x2 + x3) / 2, num3 = x4 - x1;     if (((x1 + x2 + x3 + x4) % 4 != 0) || ((x2 + x3) % 2 != 0) || num1 != num2 ||         num1 != num3 || x1 == -1 || x2 == -1 || x3 == -1 || x4 == -1)       return false;     if (x1 <= x2 && x2 <= x3 && x3 <= x4) return true;     return false;   }   bool fun(int x1, int x2, int x3, int x4, vector<int> sol) {     for (int i = 1; i <= 2000; i++) {       vector<int> Sol = sol;       int X1 = x1, X2 = x2, X3 = x3, X4 = x4;       x1 = i;       x4 = i * 3;       if (x2 == -1 && x3 != -1)         x2 = x4 + x1 - x3, sol.push_back(x2);       else if (x2 != -1 && x3 == -1)         x3 = x4 + x1 - x2, sol.push_back(x3);       else if (x2 != -1 && x3 != -1 && x2 + x3 != x1 + x4)         continue;       if (yes(x1, x2, x3, x4)) {         cout <<  YES n ;         for (int i = 0; i < (int)sol.size(); i++) cout << sol[i] <<   n ;         return true;       }       x1 = X1, x2 = X2, x3 = X3, x4 = X4, sol = Sol;     }     return false;   }   bool Fun(int x1, int x2, int x3, int x4, vector<int> sol) {     for (int i = 1; i <= 2000; i++) {       x2 = i;       x3 = x4 + x1 - x2;       vector<int> Sol = sol;       sol.push_back(x2);       sol.push_back(x3);       if (yes(x1, x2, x3, x4)) {         cout <<  YES n ;         for (int I = 0; I < (int)sol.size(); I++) cout << sol[I] << endl;         return true;       }       sol = Sol;     }     return false;   }   int main() {     ios::sync_with_stdio(false);     int n;     cin >> n;     int ar[4];     memset(ar, -1, sizeof(ar));     for (int i = 0; i < n; i++) cin >> ar[i];     if (n == 0) {       cout <<  YES n1 n1 n3 n3 ;       goto ss;     }     for (int i = 0; i < 4; i++)       for (int i1 = 0; i1 < 4; i1++)         for (int i2 = 0; i2 < 4; i2++)           for (int i3 = 0; i3 < 4; i3++) {             if (i == i1 || i == i2 || i == i3 || i1 == i2 || i1 == i3 || i2 == i3)               continue;             vector<int> sol;             int x1 = ar[i], x2 = ar[i1], x3 = ar[i2], x4 = ar[i3];             if (x1 != -1 && x4 != -1) {               if (x1 * 3 != x4) continue;             } else if (x1 == -1 && x4 != -1) {               x1 = x4 / 3;               if (x4 % 3 != 0) continue;               sol.push_back(x1);             } else if (x1 != -1 && x4 == -1) {               x4 = x1 * 3;               sol.push_back(x4);             } else if (x1 == -1 && x4 == -1)               if (fun(x1, x2, x3, x4, sol)) goto ss;             if (x2 == -1 && x3 == -1) {               if (Fun(x1, x2, x3, x4, sol)) goto ss;             } else if (x2 == -1) {               x2 = x4 + x1 - x3;               sol.push_back(x2);             } else if (x3 == -1) {               x3 = x4 + x1 - x2;               sol.push_back(x3);             }             if (yes(x1, x2, x3, x4)) {               cout <<  YES n ;               for (int I = 0; I < (int)sol.size(); I++) cout << sol[I] <<   n ;               goto ss;             }           }     cout <<  NO ;   ss:     return 0;   }   