#include <bits/stdc++.h>
using namespace std;
int main(int argc, char **argv) {
#ifndef ONLINE_JUDGE
freopen("a.in", "r", stdin);
#endif
int n, m;
cin >> n >> m;
vector<pair<long long, long long> > arr(n);
for (int i = 0; i < n; ++i)
cin >> arr[i].first >> arr[i].second;
vector<pair<long long, long long> > diff;
for (int i = 1; i < n; ++i) {
diff.push_back(
make_pair(arr[i].first - arr[i - 1].second,
arr[i].second - arr[i - 1].first));
}
vector<pair<long long, int> > lst(m);
for (int i = 0; i < m; ++i)
cin >> lst[i].first, lst[i].second = i + 1;
sort(lst.begin(), lst.end());
vector<int> ans;
for (int i = 0; i < diff.size(); ++i) {
int l = 0, r = lst.size() - 1;
int best = -1;
while (l <= r) {
int mid = (l + r) / 2;
if (lst[mid].first >= diff[i].first
&& lst[mid].first <= diff[i].second) {
best = mid;
l = mid + 1;
} else {
r = mid - 1;
}
}
if (best == -1) {
cout << "No";
return 0;
}
ans.push_back(lst[best].second);
lst.erase(lst.begin() + best);
}
cout << "Yes\n";
copy(ans.begin(),ans.end(),ostream_iterator<int>(cout," "));
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqKmFyZ3YpIHsKI2lmbmRlZiBPTkxJTkVfSlVER0UKCWZyZW9wZW4oImEuaW4iLCAiciIsIHN0ZGluKTsKI2VuZGlmCglpbnQgbiwgbTsKCWNpbiA+PiBuID4+IG07Cgl2ZWN0b3I8cGFpcjxsb25nIGxvbmcsIGxvbmcgbG9uZz4gPiBhcnIobik7Cglmb3IgKGludCBpID0gMDsgaSA8IG47ICsraSkKCQljaW4gPj4gYXJyW2ldLmZpcnN0ID4+IGFycltpXS5zZWNvbmQ7Cgl2ZWN0b3I8cGFpcjxsb25nIGxvbmcsIGxvbmcgbG9uZz4gPiBkaWZmOwoJZm9yIChpbnQgaSA9IDE7IGkgPCBuOyArK2kpIHsKCQlkaWZmL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