#include using namespace std; using vi = vector; bool remove(map &m, int x) { auto it = m.lower_bound(x); if (it == m.end()) return false; it->second--; if (it->second == 0) m.erase(it); return true; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; vi X(n); map L; for (int &x : X) cin >> x; for (int i = 0, l; i < m; ++i) cin >> l, L[l]++; for (int i = 0; i < n; ++i) for (int j = i+1; j < n; ++j) if (!remove(L, X[j] - X[i])) break; cout << (L.empty() ? "yes" : "no") << endl; }