// tested by Hightail - https://github.com/dj3500/hightail
import std.stdio, std.string, std.conv, std.algorithm;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

int n;
int[] a;
int[] b;

void main() {
    scan(n);
    a = readln.split.to!(int[]);

    b = new int[](n);

    foreach (i ; 0 .. n) {
        while (a[i] % 2 == 0) {
            b[i]++;
            a[i] /= 2;
        }
    }

    b.sort!"a > b"();

    debug {
        writeln("b:", b);
    }

    auto c = new int[](n);

    if (n & 1) {
        foreach (i ; 0 .. n) {
            if (i < n / 2) {
                c[2*i + 1] = b[i];
            }
            else {
                c[n - 1 - 2*(i - n/2)] = b[i];
            }
        }
    }
    else {
        foreach (i ; 0 .. n) {
            if (i < n / 2) {
                c[2*i + 1] = b[i];
            }
            else {
                c[n - 2 - 2*(i - n/2)] = b[i];
            }
        }
    }

    debug {
        writeln("c:", c);
    }

    foreach (i ; 0 .. n - 1) {
        if (c[i] + c[i + 1] < 2) {
            writeln("No");
            return;
        }
    }

    writeln("Yes");
}



void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}


void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}