Here the value of m and n are very large

Here the value of m and n are very large.How to find the prime nos for this range i tried sieve using bitset but that also works till 10^7

You can solve this problem using segmented seive as it is given in the problem that the difference between the numbers will be less than 10^6.

so we have to create a sieve from m to n only?

Yes seive will run in the segment l to r.