Weighted Upper Bound Sieve Principle