#include using namespace std; struct S { int l, u, v; }; bool operator<(const S &l, const S &r) { return tie(l.l, l.u) < tie(r.l, r.u); } int main() { int n, m, _; cin >> n >> m; if(m > n * (n - 1) / 2) return cout << "no\n", 0; vector x(n); multiset w; for(auto &y : x) cin >> y; while(m--) cin >> _, w.insert(_); priority_queue q; q.push({x[n - 1] - x[0], 0, n - 1}); while(!w.empty()) { if(q.empty()) return cout << "no\n", 0; auto s = q.top(); auto it = w.lower_bound(s.l); if(it != w.end()) w.erase(it); q.pop(); if(s.v - s.u < 2) continue; q.push({x[s.v] - x[s.u + 1], s.u + 1, s.v}); if(s.u == 0) q.push({x[s.v - 1] - x[s.u], s.u, s.v - 1}); } cout << "yes\n"; }