#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), a; a.reserve(n * int(sqrt(2 * m) + 2)); for(auto &y : x) cin >> y; for(auto &y : w) cin >> y; for(int d = 1; d * (d + 1) / 2 < m; ++d) for(int i = 0; i + d < n; ++i) a.push_back(x[i + d] - x[i]); sort(a.begin(), a.end()); sort(w.begin(), w.end()); for(int i = 0; i < m; ++i) if(w[i] < a[i]) return cout << "no\n", 0; cout << "yes\n"; }