Its not a 100% solutions, even the medicated masks works for 3 hours if you purchase at the cost of Rs. 700/-..they normally uses to the swine flu patients.
I strongly advise that you better to improve the body immune system ( Resistance power) , and better to avoid crowdy places..
wearing mask will obviously helps you. but not a 100% solution...
Let me point out that use of 'is' second time is superfluous and a mistake. "Is mask a solution' will suffice. If we get swine flue through breathing, it may be a solution. I think doctors expert in this disease may advise better.