No definite answer
It all depends on how closely you are situated to the smokers and the amount of smoke in the air in second-hand smoke.
In first-hand smoke it will also be dependent on how deeply you inhale the smoke. In general, i would assume that you are getting more from 1st-hand than 2nd hand smoke. Interesting question but no definite answer.