import java.util.Scanner;
import java.util.TreeSet;

public class PluggingWires_MultisetACC {

	static int alot = (1 << 30);
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt(); int m = sc.nextInt();
		
		int[] x = new int[n];
		
		for(int i = 0; i < n; i++)
			x[i] = sc.nextInt();

		TreeSet<Integer> tms = new TreeSet<Integer>
		((a,b) -> ( (Math.max(a, b) - alot == Math.min(a, b)) ? 0 : ( (a|(alot)) > (b|(alot)) ) ? 1 : -1));
		
		for(int j = 0; j < m; j++)
			tms.add(sc.nextInt());
		
		for(int i = 0; i < n; i++)
		{
			Boolean done = false;
			for(int k = 1; k < n - i && !done; k++)
			{
				if(x[i+k] == x[i]) continue;
				int val = alot + (x[i+k] - x[i]);
				Integer wire = tms.ceiling(val);
				if(wire == null)
					done = true;
				else tms.remove(wire + alot);
				
			}
		}
		
		if(tms.isEmpty())
			System.out.println("yes");
		else System.out.println("no");
		 
	}

}
