ruby (6664)
exit ARGF$<.read.tr('^[]','').tap{|x|0while x.gsub!('[]','')}.empty?
previously (68) it was:
exit ARGF.read.tr('^[]','').tap{|x| 0 while x.gsub!('[]','')}.empty?
Another equivalent solution uses
exit ARGF$<.read.tr('^[]','').tap{|x|0while x.gsub!('[]','')}.size>0
can't use size
alone because it would give false negatives (!!!) when the total number of unbalanced brackets is multiple of 256