A Train started its journey at x=-infinity is travelling on the x-Coordinate Axis. Given n passengers and the coordinates $b_i$ and $d_i$ for each of the $ith$ passenger at which they board and leave from the train respectively. Due to current COVID-19 crisis, the train is monitored at each mile/coordinate. The infection degree of the train at each mile is equal to the total passengers present in the train at that mile/coordinate. The train stops its journey if no more passengers are there to board the train. The term infection severity of the journey is defined as the sum of infection degrees noted at each mile. Find the Infection severity of the journey. Note: A passenger is considered for calculation of infection degree at both boarding and leaving stations.

Since the answer can be very large, print it modulo $(10^9)+7$.

-----Input:-----
- First line will contain $N$, number of passengers. Then the $N$ lines follow. 
- $i$th line contains two integers $b_i, d_i$ , the boarding and departure mile of $i$th passenger.

-----Output:-----
Print a single value, the Infection Severity of the journey modulo $(10^9)+7$.

-----Constraints-----
- $0 \leq N \leq 100000$
- $-500000 \leq b_i \leq 500000$
- $-500000 \leq d_i \leq 500000$

-----Sample Input:-----
3

0 2

1 3

-1 4  

-----Sample Output:-----
12    

-----EXPLANATION:-----
Infection degree at :

-1 is 1

0 is 2

1 is 3

2 is 3

3 is 2

4 is 1

Calculation started at mile -1 and ended at mile 4. Infection Severity = 1+2+3+3+2+1 =12

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = '\'\'\'\r\n    Auther: ghoshashis545 Ashis Ghosh\r\n    College: jalpaiguri Govt Enggineerin College\r\n    Date:28/04/2020\r\n\r\n\'\'\'\r\nfrom bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right\r\nfrom itertools import permutations\r\nfrom datetime import datetime\r\nfrom math import ceil,sqrt,log,gcd\r\ndef ii():return int(input())\r\ndef si():return input()\r\ndef mi():return map(int,input().split())\r\ndef li():return list(mi())\r\n\r\n\r\nabc=\'abcdefghijklmnopqrstuvwxyz\'\r\nabd={\'a\': 0, \'b\': 1, \'c\': 2, \'d\': 3, \'e\': 4, \'f\': 5, \'g\': 6, \'h\': 7, \'i\': 8, \'j\': 9, \'k\': 10, \'l\': 11, \'m\': 12, \'n\': 13, \'o\': 14, \'p\': 15, \'q\': 16, \'r\': 17, \'s\': 18, \'t\': 19, \'u\': 20, \'v\': 21, \'w\': 22, \'x\': 23, \'y\': 24, \'z\': 25}\r\nmod=1000000007\r\n#mod=998244353\r\ninf = float("inf")\r\nvow=[\'a\',\'e\',\'i\',\'o\',\'u\']\r\ndx,dy=[-1,1,0,0],[0,0,1,-1]\r\n\r\ndef powmod(a,b):\r\n    a%=mod\r\n    if(a==0):\r\n        return 0\r\n    res=1\r\n    while(b>0):\r\n        if(b&1):\r\n            res=(res*a)%mod\r\n        a=(a*a)%mod\r\n        b>>=1\r\n    return res\r\n        \r\ndef main():\r\n    \r\n\r\n    x=[0]*(1000005)\r\n    n=ii()\r\n    c=0\r\n    for i in range(n):\r\n        x1,y1=mi()\r\n        x[x1+500001]+=1\r\n        x[y1+500002]-=1\r\n        c=max(c,y1+500002)\r\n    x[c]=0\r\n    s=0\r\n    for i in range(c):\r\n        x[i]=(x[i]+x[i-1])%mod\r\n        s=(s+x[i])%mod\r\n    print(s%mod)\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\ndef __starting_point():\r\n    main()\n__starting_point()'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 8265273