#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), w(m); multiset s; for(auto &y : x) cin >> y; for(auto &y : w) cin >> y; sort(w.begin(), w.end()); s.insert(2e9); auto it = s.begin(); for(int l = 1; l < n; ++l) { bool ok = false; for(int i = 0; i + l < n; ++i) { int d = x[i + l] - x[i]; if(d > w.back() || d >= *it) continue; s.insert(d); if(s.size() > m) --it; ok = true; } if(!ok) break; } if(s.size() < m) return cout << "no\n", 0; it = s.begin(); for(int i = 0; i < m; ++i, ++it) { if(w[i] < *it) return cout << "no\n", 0; } cout << "yes\n"; }