#import <Foundation/Foundation.h>
#import <stdio.h>

@interface Solution: NSObject
- (BOOL)isFourAdjacentWithArray: (NSArray<NSNumber *> *)array;
@end

@implementation Solution
- (BOOL)isFourAdjacentWithArray: (NSArray *)array {
  if ([array count] <= 2) {
        return NO;
    }
    NSInteger countFour = 0;
    NSInteger countTwo = 0;
    for (NSInteger i=0;i<array.count;i++) {
      	NSNumber *number = array[i];
        if (number.integerValue % 4 == 0) {
            countFour ++;
        } else if (number.integerValue == 2){
            countTwo++;
        }
    }
    NSInteger countAny = array.count - countFour - countTwo;
    return abs(countFour - countAny) - countTwo < 2;
}  
@end

int main(int argc, char **argv) {
  int N;
  scanf("%d", &N);
  NSMutableArray *array = [NSMutableArray new];
  for(NSInteger i = 0; i < N; i++) {
    int v;
    scanf("%d", &v);
    [array addObject: [NSNumber numberWithInteger: v]];
  }
  printf("%s", [Solution isFourAdjacentWithArray: array] ? "YES" : "NO");
}