func_code_string: #include <bits/stdc++.h>   using namespace std;   int main() {     int n;     cin >> n;     long long a[n];     for (int i = 0; i < n; ++i) {       cin >> a[i];       while (a[i] % 2 == 0) a[i] /= 2;       while (a[i] % 3 == 0) a[i] /= 3;     }     int flag = 0;     for (int i = 1; i < n; ++i) {       if (a[i] != a[0]) {         flag = 1;         break;       }     }     if (flag == 1)       cout <<  NO ;     else       cout <<  YES ;   }   