object Main extends App {
	val N = scala.io.StdIn.readInt
	val a = scala.io.StdIn.readLine.split(" ").map(_.toLong)
	
	var count = 0
	var count1 = N

	for(i<-a){
		if(i%4L == 0L) count = count + 1
		if(i%2L == 0L && i%4 != 0) count1 = count1 - 1
	}

	if((count1-1)/2 == count && count1%2 == 1) print("YES")
	else if(count1%2 == 0 && count1/2 == count) print("YES")
	else print("NO")

}