using System;

namespace ConsoleApp10
{
    class Program
    {
        static void Main(string[] args)
        {
            int n, q;
            long k, t;
            string[] s = Console.ReadLine().Split();
            n = int.Parse(s[0]);
            q = int.Parse(s[1]);

            long[] a = new long[n];
            long[] b = new long[n];

            s = Console.ReadLine().Split();
            a[0] = long.Parse(s[0]);
            t = long.Parse(s[1]);
            for (int i = 1; i < n; i++)
            {
                s = Console.ReadLine().Split();
                a[i] = long.Parse(s[0]);
                k = a[i] - a[i - 1];
                if (t >= k)
                {
                    b[i - 1] = k;
                    t -= k - long.Parse(s[1]);
                }
                else
                {
                    b[i - 1] = t;
                    t = long.Parse(s[1]);
                }
                if (i > 1)
                    b[i - 1] += b[i - 2];
            }
            b[n - 1] = t + b[n - 2];
            for (int i = 0; i < q; i++)
            {
                k = long.Parse(Console.ReadLine());
                int p = Array.BinarySearch(a, k);
                if (p >= 0)
                    Console.WriteLine(p != 0 ? b[p - 1] + 1 : 1);
                else
                {
                    p = ~p;
                    if (p == 0)
                        Console.WriteLine(0);
                    else if (p >= n)
                    {
                        long pom = (k - a[n - 1]);
                        Console.WriteLine(pom > b[n - 1] ? b[n - 1] : b[n - 2] + 1 + pom);
                    }

                    else
                    {
                        long pom = (k - a[--p] + 1);
                        t = p > 0 ? b[p - 1] : 0;

                        Console.WriteLine(t + Math.Min(b[p], pom));
                    }
                }
            }
        }
    }
}