import java.io.*;
    import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;

    public  class Main {
    	public static InputReader in;
        public static PrintWriter pw;

    	public static void main(String args[])
    	{
    		new Thread(null, new Runnable() {
                public void run() {
                    try{
                        solve();
                    }
                    catch(Exception e){
                        e.printStackTrace();
                    }
                }
            }, "1", 1 << 26).start();
        }
    	static ArrayList<Integer> g[];
    	static ArrayList<Integer> h[];
    	static boolean visited[];
    	static int[] parent;
    	static int par[];
    	static int degree[];
    	static int edjes=0;
    	static int start=-1;
    	static int end=-1;
    	static int Total=0;
    	static int time1[];
    	static int time2[];
    	static int glob=0;
    	static int[] ans;
    	static boolean vis2[][];
    	//static long sum1=0;
    	//static long val[];
        static ArrayList<Integer> levels[];
        static int max=0;
        static int lev=1;
        static ArrayList<Integer> nodes[];
        static ArrayList<Integer> values[];
        static int depth[];
        static boolean found=false;
       // static long sm[];
        static int sum1=0;
        static int pre[][];
        static int subtree[];
       static  int cnt=0;
       static  HashMap<String,Integer> hm;
       static int sm[];
       static int size[];
       static long mul[];
       static long d[]=new long[1000000];
       static int tot=0;
       static long highest=(long)1e9;
       static boolean bit=false;
        static Stack<Integer> tt=new Stack();
       static HashSet<Character> set;
 	   static long fact[],num[];
 	   static long MOD=1000000007;
 	   static int value[];static int premen[];
 	   static int count=0,index=0;
 	   static double ans11[];
 	   static int price[];
 	   static ArrayList<String> hp[][];
 	   static boolean visit[][];
 	   static int cnu[]=new int[1000001];
 	   static int label=1;
 	   static int his[][];
 	   static int size1=0;
 	   static int up[],down[];
 	   static int TotalUp=0;
 	   static long dist[];
 	//   static HashMap<String,Integer> hm1=new HashMap();
 	  // static HashMap<Integer,Integer> hm2=new HashMap();
 	   static TreeSet<Long> set1=new TreeSet();
 	  static  long DP[][][]=new long[20][200][1500];
 	 	static int t=-1,n=-1;
 	 	static int two[],min[],r[];
 	 	static int total[];static int black[];
 	 	static int Parent[];
 	 	static int max2[];
 	 	static int tin[],tout[],a[];
 	 public static void solve() throws FileNotFoundException{

    		 in = new InputReader(System.in);
    		 pw = new PrintWriter(System.out);
    	/*	 String p=in.readString();
    	     char c[]=p.toCharArray();
    	     int z[]=new int[p.length()];
    	     z[0]=0;
    	     int left=0;
    	     int right=0;
    	     for(int i=1;i<p.length();i++)
    	     {
    	    	 if(i>right)
    	    	 {

    	    		 left=right=i;
    	    		 while(right<p.length()&&c[right]==c[right-left])
    	    			 right++;
    	    		 z[i]=right-left;
    	    		 right--;
    	    	 }
    	    	 else
    	    	 {
    	    		 int k=i-left;
    	    		 if(z[k]<right-i+1)
    	    		 {
    	    			 z[i]=z[k];
    	    		 }
    	    		 else
    	    		 {
    	    			 left=i;
    	    			 while(right<p.length()&&c[right]==c[right-left])
        	    			 right++;
        	    		 z[i]=right-left;
        	    		 right--;
    	    		 }
    	    	 }

    	     }*/
    		 int n=in.nextInt();
    		 int k=in.nextInt();
    		 int a[]=in.nextIntArray(n);
    		 int b[]=in.nextIntArray(k);
    		 TreeSet<Integer> set=new TreeSet();
    		 for(int i=0;i<k;i++)
    			 set.add(b[i]);
    		 int c=0;
    		 for(int i=0;i<n;i++)
    		 {
    			 if(a[i]==0)
    			 {
    				 int cp=0;
    				 for(int j=i;j<n;j++)
    				 {
    					 if(a[j]==0)
    						 cp++;
    				 }
    				 if(cp>1)
    				 {
    					 System.out.println("Yes");
    					 return;
    				 }
    			 }
    		 }
    		 if(k==1)
    		 {
    			 for(int i=0;i<n;i++)
    			 {
    				 if(a[i]==0)
    				 {
    					 a[i]=b[0];
    				 }
    			 }
    			 for(int i=0;i<n-1;i++)
    			 {
    				 if(a[i+1]<a[i])
    				 {
    					 System.out.println("Yes");
    					 return;
    				 }
    			 }
    		 }
    		 System.out.println("No");
    		}

 	 public static void bfs(int x)
 	 {
 		 visited[x]=true;
 		 Queue<Integer> Q=new LinkedList<Integer>();
 		 Q.add(x);
 		 while(!Q.isEmpty())
 		 {
 			 int count=Q.size();
 			 while(count>0)
 			 {
 				 int p=Q.poll();
 				 visited[p]=true;
 				 for(int y:g[p])
 				 {
 					 if(!visited[y])
 					 {
 						 Q.add(y);
 					 }
 				 }
 				 count--;
 			 }
 		 }
 	 }
 	 public static void depth(int curr,int parent)
 	 {
 		 visited[curr]=true;
 		 for(int x:g[curr])
 		 {
 			 if(!visited[x])
 			 {
 				 depth[x]=depth[curr]+1;
 				 depth(x,curr);
 			 }
 		 }
 	 }

 	 static int Par[]=new int[202];
 	 public static void Height(int cur,int par){
 		 Par[cur]=par;
 		 visited[cur]=true;
 		 int t=0;
 		 for(int x:g[cur])
 		 {
 			 if(!visited[x])
 			 {
 				 t++;
 				 Height(x,cur);
 				 high[cur]=Math.max(high[cur], high[x]+1);
 			 }
 		 }
 		 if(t==0)
 		 {
 			 high[cur]=0;
 		 }

 	 }
 	 static int dia[]=new int[202];
 	 static int high[]=new int[292];
 	 public static void Diameter(int curr,int parent)
 	 {
 		visited[curr]=true;
 		int trees=0;
 		ArrayList<Integer> set=new ArrayList();

 		for(int x:g[curr])
 		{
 			if(!visited[x])
 			{
 				trees++;
 				Diameter(x,curr);
 				dia[curr]=Math.max(dia[curr],high[x]);
 				set.add(high[x]);
 			}
 		}
 		if(set.size()>=2)
 		{
 			Collections.sort(set,Collections.reverseOrder());
 			dia[curr]=Math.max(dia[curr],set.get(0)+set.get(1)+2);
 		}
 		else if(set.size()>0)
 		{
 			dia[curr]=Math.max(dia[curr],set.get(0)+1);
 		}
 		if(trees==0)
 		{
 			dia[curr]=0;
 		}

 	 }

 	 public static boolean IsPal(String s)
 	 {
 		 char c[]=s.toCharArray();
 		 for(int i=0;i<c.length/2;i++)
 		 {
 			 if(c[i]!=c[s.length()-1-i])
 				 return false;
 		 }
 		 return true;
 	 }
 	public static void Merge(long[] a,int p,int r){
        if(p<r){
            int q = (p+r)/2;
            Merge(a,p,q);
            Merge(a,q+1,r);
            Merge_Array(a,p,q,r);
        }
    }
    public static void Merge_Array(long a[],int p,int q,int r){
       long b[] = new long[q-p+1];
        long c[] = new long[r-q];
        for(int i=0;i<b.length;i++)
            b[i] = a[p+i];
        for(int i=0;i<c.length;i++)
            c[i] = a[q+i+1];
        int i = 0,j = 0;
        for(int k=p;k<=r;k++){
            if(i==b.length){
                a[k] = c[j];
                j++;
            }
            else if(j==c.length){
                a[k] = b[i];
                i++;
            }
            else if(b[i]<c[j]){
                a[k] = b[i];
                i++;
            }
            else{
                a[k] = c[j];
                j++;
            }
        }
    }

 	  public static void dfs1(int curr,int parent)
 	  {
 		  visited[curr]=true;

 		  for(int x:g[curr])
 		  {

 			  if(x==parent)continue;
 			  depth[x]=depth[curr]+1;
 			  up[x]=up[curr];
 			  if(h[x].contains(curr)){
 				  up[x]++;
 				  TotalUp++;
 			  }
 			  dfs1(x,curr);
 		  }
 	  }

        public static void dfs(int curr,int Parent)
        {
        	visited[curr]=true;
        	size[curr]=1;
        	parent[curr]=Parent;
        	count++;
        	if(value[curr]>0)
        	{
        		index=value[curr];
        	}
        	for(int x:g[curr])
        	{
        		if(!visited[x])
        		{
        			dfs(x,curr);
        			size[curr]+=size[x];
        		}
        	}
        }
        static long ncr(long a, long b){
			if(b>a || b<0) return 0;
			long f = (fact[(int) a]*modInverse(((fact[(int) b]*fact[(int) (a-b)])%MOD), MOD))%MOD;
			return f;
		}
		static long modInverse(long a, long mOD2){
            return  power(a, mOD2-2, mOD2);
}
static long power(long x, long y, long m)
{
    if (y == 0)
        return 1;
    long p = power(x, y/2, m) % m;
    p = (p * p) % m;

    return (y%2 == 0)? p : (x * p) % m;
}

        public static long gcd(long x, long y) {
    		if (x == 0)
    			return y;
    		else
    			return gcd( y % x,x);
    	}
        public static long power(long a,long b)
		{
			long result=1;
			while(b>0)
			{
				if(b%2==1)
					result*=a;
				a=a*a;
				b/=2;
			}
			return result;
		}
        static class Pair implements Comparable<Pair>{
        	    long val;int index;
        		Pair(long val,int index){
        	     	this.val=val;
        			this.index=index;
        		}
        		@Override
        		public int compareTo(Pair o) {
                          if(o.val!=val)
                        	  return (int) (o.val-val);
                          else
                        	  return index-o.index;
        		}

        	}
    	static class InputReader {

    		private InputStream stream;
    		private byte[] buf = new byte[8192];
    		private int curChar, snumChars;
    		private SpaceCharFilter filter;

    		public InputReader(InputStream stream) {
    			this.stream = stream;
    		}

    		public int snext() {
    			if (snumChars == -1)
    				throw new InputMismatchException();
    			if (curChar >= snumChars) {
    				curChar = 0;
    				try {
    					snumChars = stream.read(buf);
    				} catch (IOException e) {
    					throw new InputMismatchException();
    				}
    				if (snumChars <= 0)
    					return -1;
    			}
    			return buf[curChar++];
    		}

    		public   int nextInt() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			int sgn = 1;
    			if (c == '-') {
    				sgn = -1;
    				c = snext();
    			}
    			int res = 0;
    			do {
    				if (c < '0' || c > '9')
    					throw new InputMismatchException();
    				res *= 10;
    				res += c - '0';
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res * sgn;
    		}

    		public long nextLong() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			int sgn = 1;
    			if (c == '-') {
    				sgn = -1;
    				c = snext();
    			}
    			long res = 0;
    			do {
    				if (c < '0' || c > '9')
    					throw new InputMismatchException();
    				res *= 10;
    				res += c - '0';
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res * sgn;
    		}

    		public int[] nextIntArray(int n) {
    			int a[] = new int[n];
    			for (int i = 0; i < n; i++)
    				a[i] = nextInt();
    			return a;
    		}

    		public String readString() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			StringBuilder res = new StringBuilder();
    			do {
    				res.appendCodePoint(c);
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res.toString();
    		}

    		public boolean isSpaceChar(int c) {
    			if (filter != null)
    				return filter.isSpaceChar(c);
    			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    		}

    		public interface SpaceCharFilter {
    			public boolean isSpaceChar(int ch);
    		}
    	}
    }

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;

public class CF_814A_AnAbandonedSentimentFromPast {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();
		int[]arr1 = new int [n];
		int[]arr2 = new int [k];

		for(int i=0 ;i<n;i++)
			arr1[i]= sc.nextInt();

		for(int i=0 ;i<k;i++)
			arr2[i]= -1*sc.nextInt();

		Arrays.sort(arr2);

		int arr3 [] = new int [Math.max(n,k)];
		int j =0 ;
		for(int i=0 ; i<arr3.length;i++)
		{
			if(arr1[i]==0)
				arr3[i]=-1*arr2[j++];
			else
				arr3[i]=arr1[i];

		}

		boolean inc = CheckIfIncreasing(arr3);

		System.out.println(inc?"No":"Yes");

	}

	public static boolean CheckIfIncreasing(int []arr){
		if(arr.length==2)
			if(arr[0]>arr[1])
				return false ;
			else
				return true;

		for(int i=1 ;i<arr.length-1;i++)
			if(arr[i]<arr[i-1]||arr[i]>arr[i+1])
				return false ;

		return true ;
	}
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(String s) throws Exception {
			br = new BufferedReader(new FileReader(s));
		}

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}
}

import java.util.*;
import java.io.*;
public class AbandonedSentimentFromPast
{
	public static void main(String args[])
	{
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int arrA[]=new int[a];
		int b=sc.nextInt();
		int arrB;
		for(int i=0;i<a;i++)
		{
			arrA[i]=sc.nextInt();
		}
			arrB=sc.nextInt();
		for(int i=1;i<b;i++)
		{
			int temp=sc.nextInt();
		}
		if(b>1||checkNotIncreasing(arrA,arrB))
		{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
	}
	public static boolean checkNotIncreasing(int arr[],int n)
	{
		if(arr[0]==0)
			arr[0]=n;
		for(int i=0;i<(arr.length-1);i++)
	 	{
			if(arr[i+1]==0)
			{
				arr[i+1]=n;
			}
			if(arr[i]>arr[i+1])
				return true;
		}
		return false;
	}
}

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for(int i = 0 ;i<n;i++)
            a[i] = in.nextInt();

        for(int i=0;i<k;i++)
            b[i] = in.nextInt();

        if(k >1 ){
            System.out.println("Yes");
            return;
        }

        boolean increasing = true;
        for(int i=0;i<n;i++){
            if(a[i]==0)
                a[i] = b[0];
            if(i>0 && a[i-1] > a[i])
                increasing = false;
        }

        if(increasing)
            System.out.println("No");
        else
            System.out.println("Yes");
    }
}

import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		while (sc.hasNext()) {
			int n=sc.nextInt();
			int k=sc.nextInt();
			int[]shu=new int[n];
			Integer[]t=new Integer[k];
			int num=0;
			int index=-1;
			HashSet<Integer>set=new HashSet<Integer>();
			for(int i=0;i<n;i++){
				shu[i]=sc.nextInt();
				if(shu[i]!=0)set.add(shu[i]);
				else index=i;
			}
			boolean flag=true;
			for(int i=0;i<k;i++){
				t[i]=sc.nextInt();
				if(set.contains(t[i]))flag=false;
			}
			if(k>=2){
				pw.println("Yes");
			}else{
				shu[index]=t[0];
				boolean h=false;
				for(int i=0;i<n-1;i++){
					if(shu[i+1]<shu[i])h=true;
				}
				if(h)pw.println("Yes");
				else pw.println("No");
			}
			pw.flush();
		}
	}
}

import java.util.Scanner;

public class increasingSequence {

	public static void main(String[] args) {
		Scanner console = new Scanner(System.in);
		int a = console.nextInt();
		int b = console.nextInt();
		int[] A = new int[a];
		int[] B = new int[b];
		boolean bool = false;
		for (int i = 0; i < a; i++) {
			A[i] = console.nextInt();
			if (i > 0 && A[i] != 0 && A[i - 1] != 0) {
				if (A[i - 1] > A[i]) {
					bool = true;
				}
			}
		}
		for (int i = 0; i < b; i++) {
			B[i] = console.nextInt();
		}

		if (b > 1 || bool) {
			System.out.println("Yes");
		} else {
			for (int i = 0; i < a; i++) {
				if (A[i] == 0) {
					if (i != 0 && A[i - 1] > B[0]) {
						System.out.println("Yes");
						break;
					}
					if (i < a - 1 && A[i + 1] < B[0]) {
						System.out.println("Yes");
						break;
					} else {
						System.out.println("No");
					}
				}
			}
		}

	}

}

import java.util.Arrays;
import java.util.Scanner;

//import test.check;

public class AbandonedSentiments {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int k = s.nextInt();
		int[] arr = new int[n];
		int[] brr = new int[k];
		int[] zrr = new int[n];

	int flag=0;

		int j = brr.length-1;
		for(int i=0;i<n;i++){

			arr[i]= s.nextInt();
			zrr[i] = arr[i];
		}
		for(int  i=0;i<k;i++){

			brr[i]= s.nextInt();

		}
		Arrays.sort(brr);
		for (int i = 0; i < n; i++) {

			if (arr[i] != 0) {
				continue;

			}
			else {
			while (j >= 0) {

					arr[i] = brr[j];
					zrr[i] = arr[i];
					j--;
				}
			}
		}
		for(int i=0;i<n;i++){
			if(issorted(zrr)){
			 flag=0;
			}else{
				flag=1;
			}
		}
		if(flag==0){
			System.out.println("No");
		}else{
			System.out.println("Yes");
		}
	}
	public static boolean issorted(int arr[]){
		int cout=0;
		for(int i=0;i<arr.length-1;i++){
			if(arr[i]<arr[i+1]){
				cout++;
			}else{
				int flag=0;
			}
		}
		if(cout==arr.length-1){
			return true;
		}else{
			return false;
		}
	}

}

import java.io.BufferedWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.util.Scanner;
import java.util.ArrayList;

public class Main {
    public static void main(String[] args) throws IOException {
        new Main().run();
    }

    private Scanner in;
    private BufferedWriter out;
    private int[] a, b;
    private int n;
    private int k;

    private void run() throws IOException {
        in = new Scanner(System.in);
        out = new BufferedWriter(new OutputStreamWriter(System.out));

        n = in.nextInt(); k = in.nextInt();
        a = new int[n];
        b = new int[k];
        for (int i = 0; i < n; ++i) {
            a[i] = in.nextInt();
        }
        for (int i = 0; i < k; ++i) {
            b[i] = in.nextInt();
        }

        if (k > 1) {
            out.write("Yes");
        }
        else {
            boolean result = true;
            for (int i = 0; i < n; ++i) {
                if (a[i] == 0) {
                    a[i] = b[0];
                }
                if (i > 0) {
                    result &= (a[i] > a[i - 1]);
                }
            }
            if (!result)
                out.write("Yes");
            else
                out.write("No");
        }

        out.flush();
    }
}

import java.util.*;
import java.io.*;

public class sol{
  public static void main(String[] args){
    FastIO io = new FastIO();
    int n = io.nextInt();
    int k = io.nextInt();
    int[] A = new int[n];
    int[] B = new int[k];
    for(int i = 0; i < n; i++){
      A[i] = io.nextInt();
    }
    for(int i = 0; i < k; i++){
      B[i] = io.nextInt();
    }
    Arrays.sort(B);
    boolean flag = false;
    int max = k - 1;
    for(int i = 0; i < n; i++){
      if(A[i] == 0) A[i] = B[max--];
      if(i > 0 && A[i] <= A[i - 1]) {
        io.println("Yes");
        flag = true;
        break;
      }
    }
    if(!flag) io.println("No");
  }
}
class FastIO{
  BufferedReader br;
  StringTokenizer st;
  public FastIO(){
    br = new BufferedReader(new InputStreamReader(System.in));
  }
  void println(Object o){
    System.out.println(o);
  }
  void print(Object o){
    System.out.print(o);
  }
  char nextChar(){
    char x = next().charAt(0);
    return x;
  }
  String next(){
    while(st == null || !st.hasMoreElements()){
      try{
        st = new StringTokenizer(br.readLine());
      } catch(IOException e){
        e.printStackTrace();
      }
    }
    return st.nextToken();
  }
  int nextInt(){
    return Integer.parseInt(next());
  }
  long nextLong(){
    return Long.parseLong(next());
  }
  double nextDouble(){
    return Double.parseDouble(next());
  }
  String nextLine(){
    String str = "";
    try{
      str = br.readLine();
    } catch(IOException e){
      e.printStackTrace();
    }
    return str;
  }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

    private static boolean solve() {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        int k = in.nextInt();

        ArrayList<Integer> a = new ArrayList<>();
        ArrayList<Integer> b = new ArrayList<>();

        for (int i = 0; i < n; ++i) {
            a.add(in.nextInt());
            if (i > 0 && a.get(i) == 0 && a.get(i - 1) == 0)
                return true;
            if (i > 0 && a.get(i) != 0 && a.get(i - 1) > a.get(i))
                return true;
        }

        for (int i = 0; i < k; ++i)
            b.add(in.nextInt());

        int max = Collections.max(b);
        int min = Collections.min(b);

        for (int i = 0; i < n; ++i) {
            if (i > 0 && a.get(i) == 0 && a.get(i - 1) > min)
                return true;
            if (i < n - 1 && a.get(i) == 0 && a.get(i + 1) < max)
                return true;
        }

        return false;
    }

    public static void main(String[] args) {
        System.out.println(solve() ? "Yes" : "No");
    }
}

import java.util.*;
import java.io.*;
import java.lang.*;
public class A814 {
	private static long mod = 1000000007;

	public static void main(String[] args) {
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int n=in.nextInt();
		int k=in.nextInt();

		int[] a =in.nextIntArray(n);
		int[] b=in.nextIntArray(k);
		Arrays.sort(b);
		int j=k-1;
		for(int i=0;i<n;i++) {
			if(a[i]==0)
			{	a[i]=b[j];
				j--;
			}

		}

		boolean flag=false;
		for(int i=0;i<n-1;i++) {
			if(a[i+1]<a[i])
			{	flag=true;
				break;
			}
		}
		if(flag==true)
			pw.println("YES");
		else
			pw.println("NO");

		pw.flush();
		pw.close();
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}
}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R418_Div2_A
{
	FastReader in;
	PrintWriter out;

	public static void main(String[] args)  {
		new R418_Div2_A().run();
	}

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		int n = in.nextInt();
		int k = in.nextInt();

		int[] a = new int[n];
		ArrayList<Integer> al1 = new ArrayList<>();
		ArrayList<Integer> al2 = new ArrayList<>();
		int zInd = -1;
		for (int i = 0; i < n; i++)
		{
			a[i] = in.nextInt();
			if (a[i] == 0)
			{
				zInd = i;
			}
			else
			{
				al1.add(a[i]);
				al2.add(a[i]);
			}
		}
		boolean yes = false;

		Collections.sort(al1);
		for (int i = 0; i < al1.size(); i++)
		{
			int x = al1.get(i);
			int y = al2.get(i);
			if (x != y)
				yes = true;
		}

		int[] b = new int[k];
		for (int i = 0; i < k; i++)
			b[i] = in.nextInt();

		if (!yes && k > 1)
			yes = true;
		else
		{
			if ((zInd > 0 && a[zInd-1] >= b[0])
			|| (zInd < n-1 && b[0] >= a[zInd+1]))
				yes = true;
		}
		out.println(yes ? "Yes" : "No");
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;

public class main implements Runnable{

    static LinkedList <Integer> adj[];
    static int co=0,f=0;

    static void Check2(int n){
        adj=new LinkedList[n+1];
        for(int i=0;i<=n;i++){
            adj[i]=new LinkedList();
        }

    }
    static void add(int i,int j){
        adj[i].add(j);
    }
    public static void main(String[] args) throws Exception {
        new Thread(null, new main(), "Check2", 1<<26).start();// to increse stack size in java
    }
    static long mod=(long)(1e9+7);
    static long le[];
    static int n;
    public void run(){
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        //Scanner in=new Scanner(System.in);
        InputReader in=new InputReader(System.in);
        PrintWriter w=new PrintWriter(System.out);

        int n=in.nextInt();
        int k=in.nextInt();
        int a[]=new int[n];
        int b[]=new int[k];
        for(int i=0;i<n;i++)
        {

            a[i]=in.nextInt();
        }
        for(int i=0;i<k;i++)
        {
            b[i]=in.nextInt();
        }

int flag=0;
       for(int i=0;i<n;i++){

            if(a[i]==0){

                int prv= Integer.MIN_VALUE;
                int next=Integer.MAX_VALUE;
                prv=(i==0?prv:a[i-1]);
                next=(i==n-1?next:a[i+1]);

                for(int j=0;j<k;j++){

                    if(b[j]<=prv||b[j]>=next){
                        flag=1;
                    }

                }

            }

       }
       if(flag==1)w.println("Yes");
        else {
int f2=0;
        for(int i=1;i<n;i++){
         if(a[i]!=0){

             if(a[i]<=a[i-1])f2=1;

         }
        }
        if(f2==1)w.println("Yes");
           else
           w.println("No");
       }
        // rec("",0,0,3);
        w.close();
    }

    static void dfs(int i,int lvl,int v[]){

        v[i]=1;
        //   System.out.println(i);
        le[1]=(long)(le[1])+1l;
        if(lvl+1<=n){
            le[lvl+1]-=1l;
        }
        Iterator <Integer> ne=adj[i].iterator();
        while(ne.hasNext()){
            int k=ne.next();

            if(v[k]==0){
                v[k]=1;
                dfs(k,lvl+1,v);
            }

        }

    }
    static class node{

        int y;
        int val;

        node(int a,int b){

            y=a;
            val=b;

        }

    }
    static  void rec(String s,int a,int b,int n){

        if(b==n){
            System.out.println(s);
            return ;
        }
        String p=s;
        if(a>b){
            s=p+")" ;
            rec(s,a,b+1,n);
        }
        if(a<n){
            s=p+"(";
            rec(s,a+1,b,n);
        }

    }

    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine()
        {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt()
        {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-')
            {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do
            {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.')
            {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.')
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class abandoned {
    static void comparetwo(int[] arr,int[] mix,int k,int jusval){
        if(k>1){
            System.out.println("Yes");
            return;
        }
        else{
            int high;
            int low;
            if(jusval>0 && arr[arr.length-1]!=0){
                low = jusval-1;
                high = jusval+1;
                if(arr[low]<mix[0] && mix[0]<arr[high]){
                    arr[jusval] = mix[0];
                    int kval=0;

                    for(int i=0;i<arr.length-1;i++){
                        if(arr[i]>=arr[i+1]){
                            kval++;
                            break;
                        }
                    }
                    if(kval==0){
                        System.out.println("No");
                        return;
                    }
                    else{
                        System.out.println("Yes");
                        return;
                    }

                }
                else{
                    System.out.println("Yes");
                    return;
                }
            }
            else if (arr[arr.length-1]==0){
                low = jusval-1;

                if(arr[low]<mix[0]){
                    int jval=0;
                    arr[jusval] = mix[0];
                    for(int i=0;i<arr.length-1;i++){
                        if(arr[i]>=arr[i+1]){
                            jval++;
                            break;
                        }
                    }
                    if(jval==0){
                        System.out.println("No");
                        return;

                    }
                    else{
                        System.out.println("Yes");
                        return;

                    }

                }
                else {
                    System.out.println("Yes");
                    return;
                }
            }
            else{
                high = jusval+1;

                if(arr[high]<mix[0]){
                    int mval=0;
                    arr[jusval] = mix[0];
                    for(int i=0;i<arr.length-1;i++){
                        if(arr[i]>=arr[i+1]){
                            mval++;
                            break;
                        }
                    }
                    if(mval==0){
                        System.out.println("No");
                        return;

                    }
                    else{
                        System.out.println("Yes");
                        return;

                    }

                }
                else{
                    System.out.println("No");
                    return;
                }

            }

        }

    }
    public static void main(String[] args){
        int n,k;
        FastReader fastReader=new FastReader();
        n=fastReader.nextInt();
        k= fastReader.nextInt();
        int[] test = new int[n];
        int[] mix = new int[k];
        int count=0;
        for (int i=0;i<n;i++){
            test[i] = fastReader.nextInt();
            if(test[i]==0){
                count=i;
            }
        }
        for (int i=0;i<k;i++){
            mix[i] = fastReader.nextInt();
        }
        comparetwo(test,mix,k,count);

    }
}
class FastReader {
    public static BufferedReader br;
    public static StringTokenizer st;
    public FastReader(){
        br = new BufferedReader(new InputStreamReader(System.in));
    }
    static String next() {
        while(st==null || !st.hasMoreElements()) try {
            st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
        return st.nextToken();
    }
    public static int nextInt(){
        return  Integer.parseInt(next());
    }
}

import java.util.*;
import static java.lang.Math.*;

public class Hello {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[] a = new int[n];
		int[] b = new int[k];
		String index = "";
		int count = 0;
		String output = "YES";
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 0; i < k; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			if (a[i] == 0) {
				a[i] = b[count];
				count++;
				index = index + "" + i + "##";
			}
		}
		output = checkSeq(a, n);
		if (output.equals("NO")) {
			String[] indexs = index.split("##");
			if (indexs.length > 1) {
				for (int i = 0; i < index.length(); i++) {
					if(!output.equals("YES")){
						int tt=a[indexs.length-i-1];
						a[indexs.length-i-1]=a[Integer.parseInt(indexs[i])];
						a[Integer.parseInt(indexs[i])]=tt;
						output=checkSeq(a, n);
					}
				}
			}
		}
		System.out.print(output);
	}

	public static String checkSeq(int[] a,  int n) {
		String output = "YES";
		int tmp = 0;
		for (int i = 0; i < n; i++) {
			if (i < (n - 2)) {
				if (a[i + 1] > a[i])
					tmp++;
			}
		}
		if (tmp == (n - 2)) {
			if (a[n - 1] > a[n - 2])
				output = "NO";
		}
		return output;
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF814A {
	static class Node {
		int val;

		Node(int v) {
			this.val = v;
		}
	}

	public static void main(String[] args) {
		FastReader fr = new FastReader();
		int n = fr.nextInt();
		int k = fr.nextInt();
		ArrayList<Node> a = new ArrayList<Node>();
		ArrayList<Node> b = new ArrayList<Node>();
		for (int i = 0; i < n; i++)
			a.add(new Node(fr.nextInt()));
		for (int i = 0; i < k; i++)
			b.add(new Node(fr.nextInt()));
		b.sort((Node n1, Node n2) -> n2.val - n1.val);
		int j = 0;
		int i = 0;
		int prev = 0;
		for(i=0;i<n;i++) {
			if (a.get(i).val == 0) {
				Node m = a.get(i);
				m.val = b.get(j++).val;
			}
		}
		for(i=0;i<n;i++)
		{
			if(a.get(i).val>prev)
			{
				prev = a.get(i).val;
			}
			else
			{
				System.out.println("Yes");
				return;
			}
		}
		System.out.println("No");
		// for(int i=0;i<b.size();i++)
		// System.out.println(b.get(i).val);
	}

	// Better IO Class
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public Double nextDouble() {
			return Double.parseDouble(next());
		}

		public Float nextFloat() {
			return Float.parseFloat(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				System.out.println(e);
			}
			return str;
		}
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        String YES = "Yes";
        String NO = "No";

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int k = in.readInt();
            int[] a = IOUtils.readIntArray(in, n);
            int[] b = IOUtils.readIntArray(in, k);
            int aZeros = ArrayUtils.count(a, 0);
            if (b.length != aZeros) throw new RuntimeException();
            if (b.length != 1) {
                out.printLine(YES);
                return;
            }
            int aZeroIndex = ArrayUtils.find(a, 0);
            a[aZeroIndex] = b[0];
            for (int i = 0; i < n - 1; i++) {
                if (a[i] >= a[i + 1]) {
                    out.printLine(YES);
                    return;
                }
            }
            out.printLine(NO);
        }
    }
    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
    static interface IntIterator {
        public int value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();
        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
        default public int count(int value) {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (it.value() == value) {
                    result++;
                }
            }
            return result;
        }
    }
    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }
    }
    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);
        public abstract void removeAt(int index);
        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
        default public int find(int value) {
            int size = size();
            for (int i = 0; i < size; i++) {
                if (get(i) == value) {
                    return i;
                }
            }
            return -1;
        }
    }
    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = in.readInt();
            }
            return array;
        }
    }
    static interface IntReversableCollection extends IntCollection {
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }
    }
    static interface IntCollection extends IntStream {
        public int size();
    }
    static class ArrayUtils {
        public static int count(int[] array, int value) {
            return new IntArray(array).count(value);
        }

        public static int find(int[] array, int value) {
            return new IntArray(array).find(value);
        }
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class t1 {
 public static void main(String[] args) {
     Scanner s=new Scanner(System.in);
    int n=s.nextInt();
    int n2=s.nextInt();
    ArrayList<Integer> a1=new ArrayList<>();
    ArrayList<Integer> a2=new ArrayList<>();
    for(int i=0;i<n;i++)
        a1.add(s.nextInt());
    for(int i=0;i<n2;i++)
        a2.add(s.nextInt());
    ArrayList<Integer> a2c=new ArrayList<>(a2);
    Collections.sort(a2c);
    if(a1.get(0)>=a1.get(n-1)&&a1.get(n-1)!=0&&a1.get(0)!=0&&n!=2){
        System.out.println("Yes");
        System.exit(0);}
    else if(!(a2c.equals(a2))){
        System.out.println("Yes");
        System.exit(0);}
    for(int i=a1.indexOf(0),j=0;j<n2;i++,j++ )
        a1.set(i,a2.get(j));
    ArrayList<Integer> a1c=new ArrayList<>(a1);
    Collections.sort(a1c);
    if(a1c.equals(a1)){
         if(n2>1){
             int fn=a2.get(0);
             for(int i=1;i<n2;i++)
                 if(a2.get(i)!=fn){
                     System.out.println("Yes");
                     System.exit(0);}
             System.out.println("No");
         }
         else
             System.out.println("No");
    }
    else
         System.out.println("Yes");
    }
}

import java.util.*;

public class jkm{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n,k;
        n=sc.nextInt();
        k=sc.nextInt();
        int []a=new int[n];
        for(int i=0;i<n;i++){
            a[i]=sc.nextInt();
        }
        int []b=new int[k];
        for(int i=0;i<k;i++){
            b[i]=sc.nextInt();
        }
        Arrays.sort(b);
        int ii=k-1;
        for(int j=0;j<n;j++){
            if(a[j]==0) {a[j]=b[ii];ii--;}
        }
        int f=0;
        for(int i=0;i<n-1;i++){
            if(a[i]>a[i+1]){
                f=1;break;
            }
        }
        if(f==1) System.out.println("Yes");
        else System.out.println("No");
    }
}

import java.util.*;

public class JavaApplication168<T> {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        boolean xxx = true;
        int n = sc.nextInt(); int k = sc.nextInt();
        int arr[] = new int[n];
        Integer arr2[] = new Integer[k];
        for(int i=0; i<n; i++){
            arr[i] = sc.nextInt();
        }

        for(int i=0; i<k; i++){
            arr2[i] = sc.nextInt();
        }
        Arrays.sort(arr2,Collections.reverseOrder());

        int c = 0;
        if(arr[0] == 0){
            if(c < k){
                arr[0] = arr2[c];
                c++;
            }
        }
        for(int i=1; i<n; i++){

            if(arr[i] == 0 || arr[i-1] == 0){
                if(c < k){
                    arr[i] = arr2[c];
                    c++;
                }else{
                    c++;
                }

                if(arr[i] < arr[i-1]){
                    xxx = false;
                }
            }else if(arr[i] < arr[i-1]){
                xxx = false;
            }
        }

        if(!xxx){
            if(c > k){
                System.out.println("NO");
            }else{
                System.out.println("YES");
            }
        }else{
            System.out.println("NO");
        }

    }

}

import java.util.*;
import java.io.*;
import java.lang.Math.*;

public class Main{
	public static void main(String args[]){
		PrintWriter pw=new PrintWriter(System.out);
		InputReader ip=new InputReader(System.in);

		int n=ip.nextInt();
		int k=ip.nextInt();

		int a[] = new int[n];
		for(int i = 0;i < n;i++){
			a[i] = ip.nextInt();
		}
		int b[] = new int[k];
		for(int i = 0;i<k;i++){
			b[i] = ip.nextInt();
		}
		Arrays.sort(b);

		int maxCont=0;
		int tempCont=0;
		for(int i=0;i<n;i++){
			if(a[i]==0){
				tempCont++;
				maxCont=Math.max(tempCont,maxCont);
			}
			else{
				tempCont=0;
			}
		}
		if(maxCont>1) pw.println("Yes");
		else{
			boolean possible=false;
			for(int i=0;i<n;i++){
				if(a[i]!=0){
					if(i==0){
					if(a[i+1]!=0){
						possible = a[i]>a[i+1]?true:possible;
					}
				}
				else if(i==n-1){
					if(a[i-1]!=0)
						possible=a[i]<a[i-1]?true:possible;
				}
				else{
					if(a[i-1]!=0){
						possible=a[i]<a[i-1]?true:possible;
					}
					if(a[i+1]!=0){
						possible=a[i]>a[i+1]?true:possible;
					}
				}
				}

			}

			int bindex=k-1;
			for(int i=0;i<n && !possible;i++){
				if(a[i]==0){
					if(i>0 && i<n-1){
						possible = b[bindex]< a[i-1] || b[bindex]>a[i+1]?true:possible;
						if(possible)break;
					}
					else if(i==0){
						if(b[bindex]>a[i+1]){
							possible=true;
							break;
						}
					}
					else{
						if(b[bindex]<a[i-1]){
							possible=true;
							break;
						}
					}
					a[i]=b[bindex--];
				}
			}

			if(possible){
				pw.println("Yes");
			}
			else{
				pw.println("No");
			}
		}

		pw.close();
	}
	static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
}

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;

public class Main {

    public static void main(String[] args) {
        FastReader in = new FastReader();
        int n = in.nextInt();
        int k = in.nextInt();
        int [] a  = new int[n];
        int [] b = new int[k];
        for(int i =0;i<a.length;i++){
            a[i] = in.nextInt();
        }
      for(int i= 0;i<b.length;i++){
          b[i] = in.nextInt();
      }
        sort(b);
        int m = k-1;
        boolean flag = false;
        for (int i = 0; i < a.length; i++) {
            if(a[i]==0){
                a[i]=b[m];
                m--;
            }
        }
        for (int i = 0; i +1< a.length; i++) {
            if(a[i]>a[i+1]){
                flag=true;
                break;
            }
        }
        if(flag){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}

class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Scanner;

public class Main {
    private boolean isIncreasing(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++) {
            if (arr[i + 1] < arr[i])
                return false;
        }
        return true;
    }

    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            for (int i = 0; i < a.length; i++) {
                if (a[i] == 0) {
                    a[i] = b[0];
                }
            }
//            System.out.println("a is increasing?:  " + isIncreasing(a));
        }
        return isIncreasing(a);
    }

    public static void main(String[] args) {
//        int n = 4;
//        int k = 1;

        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }

//        a[0] = 2;
//        a[1] = 0;
//        a[2] = 9;
//        a[3] = 14;
//        b[0] = 5;
        Main main = new Main();

        boolean check = main.setiment(a, b, n, k);
        String result;

        if (b.length > 1) {
            System.out.println("Yes");
        } else {
            if (!check) {
                result = "Yes";
            } else {
                result = "No";
            }
            System.out.println(result);
        }

    }
}

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            for (int i = 0; i < n; i++) {
                if (a[i] == 0) {
                    a[i] = b[0];
                }
            }
            for (int i = 0; i < n - 1; i++) {
                if (a[i + 1] < a[i]) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        if (k > 1 || check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.util.*;
public class sub {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		int []a = new int[n];
		int index = -1;
		for(int i=0;i<n;i++)
		{
			a[i] = in.nextInt();
			if(a[i]==0)
				index = i;
		}
		int []b = new int[k];
		for(int i=0;i<k;i++)
			b[i] = in.nextInt();
		if(k>1)
			System.out.println("Yes");
		else{
			int d=0;
			a[index] = b[0];
			for(int i=1;i<n;i++)
			{
				if(a[i]-a[i-1]<0)
				{
					d = 1;
					System.out.println("Yes");
					break;
				}

			}
			if(d==0)
				System.out.println("No");
		}

	}

}

import java.util.Arrays;
import java.util.Scanner;

public class Question814A {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int m=sc.nextInt();
        int[] arr=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=sc.nextInt();
        }
        int[] arr1=new int[m];
        for(int i=0;i<m;i++){
            arr1[i]=sc.nextInt();
        }
        if(m>1){
            System.out.println("Yes");
        }else {

            int j=0;
            for(int i=0;i<arr.length;i++){
                if(arr[i]==0){
                    arr[i]=arr1[j];
                    j++;
                }
            }
            int[] copy=new int[arr.length];
            for(int i=0;i<arr.length;i++){
                copy[i]=arr[i];
            }
            Arrays.sort(copy);
            if(Arrays.equals(copy,arr)){
                System.out.println("No");
            }else {
                System.out.println("Yes");
            }
        }

//        for(int i=0;i<arr.length;i++){
//           System.out.print(copy[i]+" ");
//        }
//        for(int i=0;i<arr.length;i++){
//            System.out.print(arr[i]+" ");
//        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author O(1)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {

            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            int[] b = new int[k];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();//ninja
            for (int i = 0; i < k; i++)
                b[i] = in.nextInt();//selection
            Arrays.sort(b);
            int j = 0;
            for (int i = n - 1; i >= 0; i--) {
                if (a[i] == 0) {
                    a[i] = b[j++];
                }

            }
            boolean flag = false;
            for (int i = 1; i < n; i++) {
                if (a[i] >= a[i - 1]) {
                    flag = true;
                } else {
                    flag = false;
                    break;

                }

            }
            if (flag) {
                out.print("No");
            } else {
                out.print("Yes");
            }

        }

    }
}

import java.util.Scanner;
import java.util.Arrays;
public class Ishu
{
	public static void main(String []args)
	{
	Scanner scan=new Scanner(System.in);
	int n,k,i,index=1;
	String ans="Yes";
	int[] a=new int[100];
	int[] b=new int[100];
	n=scan.nextInt();
	k=scan.nextInt();
	for(i=0;i<n;++i)
		{
		a[i]=scan.nextInt();
		if(a[i]==0)
			index=i;
		}
	for(i=0;i<k;++i)
		b[i]=scan.nextInt();
	if(k==1)
		{
		a[index]=b[0];
		for(i=0;i<n-1;++i)
			if(a[i]>=a[i+1])
				break;
		if(i==n-1)
			ans="No";
		}
	System.out.println(ans);
	}
}

//import sun.reflect.generics.tree.Tree;

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class citylights {

    public static void main(String[] args) {

        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n=in.nextInt();
        int k=in.nextInt();
        int []a=new int[n];
        int []b=new int[k];
        for(int i=0;i<n;i++)
            a[i]=in.nextInt();//ninja
        for (int i=0;i<k;i++)
            b[i]=in.nextInt();//selection
        Arrays.sort(b);
        int j=0;
        for(int i=n-1;i>=0;i--)
        {
            if(a[i]==0)
            {
                a[i]=b[j++];
            }

        }
        boolean flag=false;
        for(int i=1;i<n;i++)
        {
            if(a[i]>=a[i-1])
            {
                flag=true;
            }else
            {
                flag=false;
                break;

            }

        }
        if(flag)
        {
            out.print("No");
        }else
        {
            out.print("Yes");
        }

       out.close();
    }

    static class InputReader {

        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar, snumChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int snext() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = snext();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = snext();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = nextInt();
            return a;
        }

        public String readString() {
            int c = snext();
            while (isSpaceChar(c))
                c = snext();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = snext();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

 //@Manan Parmar

public class Solution2 implements Runnable {

    public void run() {

        InputReader sc = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n=sc.nextInt(),k=sc.nextInt(),x=0,j=k-1,a[]=new int[n],b[]=new int[k];
        for(int i=0;i<n;i++)
            a[i]=sc.nextInt();
        for(int i=0;i<k;i++)
            b[i]=sc.nextInt();
        Arrays.sort(b);
        for(int i=0;i<n;i++)
        {
            if(a[i]==0)
            {
                a[i]=b[j];
                j--;
            }
        }
        for(int i=0;i<n-1;i++)
            if(a[i+1]-a[i]<0)
            {
                x=1;
                break;
            }

        out.println(x==1?"YES":"NO");
        out.close();
    }

//========================================================================

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt() {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
                return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    public static void main(String args[]) throws Exception {
        new Thread(null, new Solution2(),"Main",1<<27).start();
    }
}

import java.util.*;

public class Katacode
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    int A[]=new int[n];
    int B[]=new int[k];

    String flag="No";
    for(int i=0;i<n;i++)
      A[i]=sc.nextInt();
    for(int i=0;i<k;i++)
      B[i]=sc.nextInt();
    Arrays.sort(B);
   int s=k-1;
    for(int i=0;i<n;i++)
    {
      if(A[i]==0)
      {
        A[i]=B[s--];
      }
    }
    for(int i=0;i<n-1;i++)
    {
      if(A[i]>=A[i+1])
      {
        flag="Yes";
        break;
      }
    }
    System.out.println(flag);

  }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class _418 {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		int aSize, bSize;
		aSize = input.nextInt();
		bSize = input.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>(aSize);
		ArrayList<Integer> b = new ArrayList<Integer>(bSize);

		for(int i = 0 ; i < aSize ; i++)
			a.add(input.nextInt());

		for(int i = 0; i < bSize ; i++)
			b.add(input.nextInt());

		Collections.sort(b, Collections.reverseOrder());

		boolean isValid = false;

		for(int i = 0; i < aSize ; i++){
			if(i != (aSize - 1) && a.get(i) > a.get(i+1) && a.get(i+1) != 0){
				isValid = true;
				break;
			}
			if(a.get(i) == 0){

				for(int j = 0 ; j < bSize ; j++){

					if(i != 0){
						if(b.get(j) < a.get(i-1)){
							isValid = true;
							break;
						}
					}
					if(i != (aSize - 1)){
						if(b.get(j) > a.get(i+1)){
							isValid = true;
							break;
						}
					}
				}
			}

			if(isValid) break;
		}

		if(isValid)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt(), m = scan.nextInt();
		int[] a = scan.nextIntArray(n);
		int[] b = scan.nextIntArray(m);
		if(m > 1){
			out.println("Yes");
			out.close();
			return;
		}
		boolean res = false;
		for(int i = 0; i < n; i++) if(a[i] == 0) a[i] = b[0];
		for(int i = 1; i < n; i++) if(a[i-1] > a[i]) res = true;
		out.println(res?"Yes":"No");
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.util.*;

public class MissingSequence{
   public static void main(String args[]) {
	   Scanner scanner = new Scanner(System.in);
	   int parentLength = scanner.nextInt();
	   int childLength = scanner.nextInt();
	   int[] parent = new int[parentLength];
	   int[] child = new int[childLength];
	   for(int i=0;i<parentLength ;i++) {
		   int element = scanner.nextInt();
		   parent[i]=element;
	  }
	  for(int j=0;j<childLength;j++){
		  int element = scanner.nextInt();
		  child[j]=element;

      }
      Arrays.sort(child);
      int index=childLength-1;
      for(int i=0;i<parentLength;i++){
		  if(parent[i]==0){
			  parent[i]=child[index];
			  index--;
		  }
      }
      boolean increasing=true;

      for(int i=0;i<parentLength-1;i++){
		  if(parent[i]>parent[i+1]){
			  increasing=false;
			  break;
		  }
	 }
	 if(!increasing){
		 System.out.println("Yes");
	} else {
		System.out.println("No");
    }

   }
}

import java.util.Scanner;

/**
 * Created by imahmoud on 5/13/17.
 */
public class A {
    public void solve(){
        Scanner in =  new Scanner(System.in);
        int N = in.nextInt();
        int K = in.nextInt();
        if(K > 1){
            System.out.println("Yes");
        }else{
            int p = -1;
            int[] arr= new int[N];

            for (int i = 0; i < N; i++) {
                arr[i] = in.nextInt();
            }
            int s = in.nextInt();

            for (int i = 0; i < N; i++) {
                if(arr[i] == 0)
                    arr[i] = s;
                if(p>arr[i]){
                    System.out.println("Yes");
                    return;
                }
                p = arr[i];
            }
            System.out.println("No");
        }
    }
    public static void main(String[] args) {
        new A().solve();
    }
}

import java.util.*;

public class AbondonedSentimentPast {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int k = scanner.nextInt();
        Integer[] a, b;
        a = new Integer[n];
        b = new Integer[k];
        for(int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
        }
        for(int i = 0; i < k; i++) {
            b[i] = scanner.nextInt();
        }
        Arrays.sort(b, Collections.reverseOrder());
        int j= 0;
        for(int i = 0; i < n; i++) {
            if (a[i] == 0) {
                a[i] = b[j++];
            }
        }
        boolean ans = false;
        for(int i = 0; i < n-1; i++) {
            if (a[i] > a[i+1])
                ans = true;
        }
        if (ans) {
            System.out.println("Yes");
        }
        else {
            System.out.println("No");
        }
    }
}

/*
 * Remember a 7.0 student can know more than a 10.0 student.
 * Grades don't determine intelligence, they test obedience.
 * I Never Give Up.
 */
import java.util.*;
import java.io.*;

import static java.lang.System.out;
import static java.util.Arrays.sort;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.binarySearch;
import static java.lang.Math.pow;
//import static java.lang.Math.sqrt;
//import static java.lang.Math.ceil;
import static java.lang.Math.abs;
//import static java.lang.Math.min;
//import static java.lang.Math.max;
//import static java.lang.Math.floor;
public class ContestMain {
	private static Reader in=new Reader();
	private static StringBuilder ans=new StringBuilder();
//	private static long MOD=1000000007;//10^9+7
//	private static final int N=(int)100001;
//	private static final double PI=3.1415;
//	private static ArrayList<Integer> v[]=new ArrayList[N];
//	private static long color[]=new long[2]; //For Graph Coloring
//	private static boolean mark[]=new boolean [N];
//	static int choice=Integer.MAX_VALUE,trav=Integer.MAX_VALUE;
//	private static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//	public static void dfs(int node){for(int x:v[node]){if(!mark[x]){dfs(x);}}}

	public static void solve(int ar[],int kr[],int n,int k){
		boolean flag=false;
		for(int i=0;i<n;i++){
			if(ar[i]==0){
				for(int j=0;j<k;j++){
					if(i+1<n&&kr[j]>ar[i+1]){
						flag=true;
						break;
					}
					else if(i-1>=0&&kr[j]<ar[i-1]){
						flag=true;
						break;
					}
				}
			}
			else{
				if(i-1>=0&&ar[i]<ar[i-1]){
					flag=true;
					break;
				}
			}
			if(flag)break;
		}
		if(flag)out.println("Yes");
		else out.println("No");
	}

	public static void main(String[] args) throws IOException{
		int n=in.nextInt();
		int k=in.nextInt();
		int ar[]=new int[n];
		int kr[]=new int[k];
		for(int i=0;i<n;i++)
			ar[i]=in.nextInt();
		for(int i=0;i<k;i++)
			kr[i]=in.nextInt();
		solve(ar,kr,n,k);

	}
	static class Reader{
        BufferedReader br;
        StringTokenizer st;

        public Reader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.Arrays;
import java.util.Scanner;

public class A814 {

	public static boolean isIncreasing(int[]arr)
	{
	    for(int i=1; i<arr.length;i++)
	    {
	        if(arr[i-1]>arr[i])
	            return false;
	    }
	    return true;
	 }

	public static void main(String[] args) {
		Scanner br=new Scanner(System.in);

		int n=br.nextInt();
		int k=br.nextInt();

		if(k>1){
			System.out.println("Yes");
		}
		else{

		int l[] = new int[n];
		int r[] = new int[k];
		int l2[] = new int[k];

		for (int i = 0; i < n; i++) {
			l[i] =br.nextInt();
		}

		for (int i1 = 0; i1 < k; i1++) {
			r[i1] =br.nextInt();
		}
		int p =0;
		for (int j = 0; j < n; j++) {

				if (l[j]==0) {

					l[j]=r[p];
					p++;

			//	}
			}
	}

	if (isIncreasing(l)) {
		System.out.println("No");
	}	else {
		System.out.println("Yes");
	}

		}
	}
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main (String[] args) throws java.lang.Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken()),
            k = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        int[] a = new int[n],
            b = new int[k];
        for (int i=0 ; i<n ; i++) a[i] = Integer.parseInt(st.nextToken());
        st = new StringTokenizer(br.readLine());
        for (int i=0 ; i<k ; i++) b[i] = Integer.parseInt(st.nextToken());
        for (int i=k ; i>0 ; i--) {
            int rand = (int)(Math.random() * i);
            int temp = b[rand];
            b[rand] = b[i-1];
            b[i-1] = temp;
        }
        Arrays.sort(b);
        //    System.out.println(Arrays.toString(b));
        for (int i=0, j=k-1 ; i<n ; i++) {
            if (a[i] != 0) continue;
            a[i] = b[j--];
        }
        //    System.out.println(Arrays.toString(a));
        for (int i=1 ; i<n ; i++) {
            if (a[i]<=a[i-1]) {
                System.out.println("Yes");
                return;
            }
        }
        System.out.println("No");
    }
}

import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class AbandonedSentiment {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int[] a = new int[n];
		int[] b = new int[k];

		for (int i = 0 ; i < a.length; i++) {
			a[i] = scan.nextInt();
		}

		for (int i = 0; i < b.length; i++) {
			b[i] = scan.nextInt();
		}

		Arrays.sort(b);

		if (possible(a, b)) System.out.println("No");
		else System.out.println("Yes");

	}

	/**
	 * Returning false means it can't be ordered
	 * @param a
	 * @param b
	 * @return
	 */
	public static boolean possible(int[] a, int[] b) {
		int i = 1;
		int k = b.length - 1;
		if (a[0] == 0) {
			a[0] = b[k];
			k--;
		}
		for (i = i; i < a.length; i++) {
			if (a[i] == 0) {
				if (a[i - 1] > b[k]) {
					return false;
				} else {
					a[i] = b[k--];
				}
			} else if (a[i - 1] > a[i]){
				return false;
			}
		}

		return true;
	}

}

import java.util.*;
public class past
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[k];
		int f=0,c=0,p=0,max=0,q=k-1,z=0;
		for(int i=0;i<n;i++)
		{

			a[i]=sc.nextInt();
			if(a[i]!=0&&i>0)
			{
				if((a[i]<a[i-1])&&a[i-1]!=0)
				{
					f++;
				}
			}
		}
		for(int i=0;i<k;i++)
		{

			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		max=a[0];
		for(int i=0;i<n;i++)
		{

			if(a[i]==0)
			{
				if(i==0)
				{
					if(b[q]>a[i+1])
				{
					z++;
					break;
				}
				}
				else
				if(i==n-1)
				{
					if(b[q]<a[i-1])
				{
					z++;
					break;
				}
				}
				else
				if(b[q]<a[i-1]||b[q]>a[i+1])
				{
					z++;
					break;
				}
				q--;
			}

		}
		if(z>0||f>0)
		{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
	}
}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
					int kt = kid[t-1];
				kid[k]=arr[p];
				p=p+1;
				if(p == t1){
					for(int i=0;i<t && b== false;i++){
					for(int j=i+1;j<t && b== false;j++){
						if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
							System.out.println("YES");
							b = true;
							break;
						}

					}
				}
				}
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
	}

import java.util.*;
public class Solution {
    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt(),k=in.nextInt();
        if (k>1) {System.out.println("Yes");}
        else {
        	int[] a=new int[n];
        	for (int i=0;i<n;i++) {a[i]=in.nextInt();}
        	int p=0;
        	for (int i=0;i<n;i++) {
        		if (a[i]==0) {a[i]=in.nextInt();}
        		if (a[i]<p) {
        			System.out.println("Yes");
        			in.close();
        			return;
        		}
        		p=a[i];
        	}
        	System.out.println("No");
        }
        in.close();
    }
}

import java.io.*;
import java.util.StringTokenizer;

/**
 * Created by hieptk on 2/17/2017.
 */
public class Main {

	class IOManager {
		BufferedReader reader;
		PrintWriter writer;
		StringTokenizer tokenizer;

		IOManager() {
			reader = new BufferedReader(new InputStreamReader(System.in));
			writer = new PrintWriter(new BufferedOutputStream(System.out));
			tokenizer = new StringTokenizer("");
		}

		IOManager(String file) throws FileNotFoundException {
			reader = new BufferedReader(new FileReader(file));
			writer = new PrintWriter(new BufferedOutputStream(System.out));
			tokenizer = new StringTokenizer("");
		}

		String next() throws IOException {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				String line = reader.readLine();
				if (line == null)
					return null;
				tokenizer = new StringTokenizer(line);
			}
			return tokenizer.nextToken();
		}

		public Integer nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public Double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public void write(Object obj) {
			writer.print(obj.toString());
		}

		public void writeSpace(Object obj) {
			writer.print(obj.toString() + " ");
		}

		public void writeLine(Object obj) {
			writer.println(obj.toString());
		}

		public void close() {
			writer.close();
		}
	}

	IOManager ioManager;

	Main() {
		ioManager = new IOManager();
	}

	Main(String file) throws FileNotFoundException {
		ioManager = new IOManager(file);
	}

	void solve() throws IOException {
		int n, k;
		n = ioManager.nextInt();
		k = ioManager.nextInt();
		if (k > 1) {
			ioManager.writeLine("Yes");
			return;
		}
		int a[] = new int[n + 1];
		int vt = 0;
		for (int i = 1; i <= n; ++i) {
			a[i] = ioManager.nextInt();
			if (a[i] == 0)
				vt =i;
		}
		a[vt] = ioManager.nextInt();
		for (int i = 1; i < n; ++i) {
			if (a[i] >= a[i + 1]) {
				ioManager.writeLine("Yes");
				return;
			}
		}
		ioManager.writeLine("No");
	}

	void close() {
		ioManager.close();
	}

	public static void main(String args[]) throws IOException {
		Main solver;
		if (!"true".equals(System.getProperty("ONLINE_JUDGE"))) {
			solver = new Main("input.txt");
		} else {
			solver = new Main();
		}
		solver.solve();
		solver.close();
	}
}

import java.io.*;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

/**
 * Created by WiNDWAY on 6/17/17.
 */

public class Codeforces_round_418_div_2_AnAbandonedSentimentFromPast {

    public static void main(String[] args) {
        FScanner input = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out), true);
        int n = input.nextInt();
        int k = input.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < a.length; i++) {
            a[i] = input.nextInt();
        }
        int[] b = new int[k];
        for (int i = 0; i < b.length; i++) {
            b[i] = input.nextInt();
        }
        Arrays.sort(b);
        boolean lessThan = true;
        int sum = 0;
        for (int i = 0; i < a.length - 1; i++) {
            int current = a[i];
            int next = a[i + 1];
            if (current != 0 && current > next) {
                lessThan = false;
            }
            sum += current;
        }
        if (!lessThan || sum == 0) {
            int lastIndex = b.length - 1;
            for (int i = 0; i < a.length; i++) {
                if (a[i] == 0 && lastIndex >= 0) {
                    a[i] = b[lastIndex];
                    lastIndex--;
                }
            }
        } else {
            int index = 0;
            for (int i = 0; i < a.length; i++) {
                if (a[i] == 0 && index < b.length) {
                    a[i] = b[index];
                    index++;
                }
            }
        }
        for (int i = 0; i < a.length - 1; i++) {
            int current = a[i];
            int next = a[i + 1];
            if (current > next) {
                out.println("Yes");
                System.exit(0);
            }
        }
        for (int i = 0; i < a.length - 1; i++) {
            if (a[i] != a[i + 1]) {
                out.println("No");
                System.exit(0);
            }
        }
        out.println("Yes");
        out.close();
    }

    public static PrintWriter out;

    public static class FScanner {
        BufferedReader br;
        StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        private String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

    }
}

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Scanner;

public class game {
public static void main(String args[]){
	Scanner s=new Scanner(System.in);
int n=s.nextInt();
int k=s.nextInt();
ArrayList<Integer> a=new ArrayList<>();
ArrayList<Integer> b=new ArrayList<>();
for(int i=0;i<n;i++)
	a.add(s.nextInt());
for(int i=0;i<k;i++)
	b.add(s.nextInt());
b.sort(null);
int i=0;
for(i=0;i<n;i++){
	if(a.get(i)==0){
		a.set(i, b.get(b.size()-1));
		b.remove(b.size()-1);
	}
}
int m=a.get(0);
for(i=1;i<n;i++){
	if(m>=a.get(i)){
		System.out.println("Yes");
		return;
	}
	m=a.get(i);
}
if(i==n)
	System.out.println("No");
	}

}

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int length1 = s.nextInt();
		int length2 = s.nextInt();
		int[] motherSequence = new int[length1];
		int[] completeSequence = new int[length2];
		int numzero = 0;
		for (int i = 0; i < motherSequence.length; i++) {
			motherSequence[i] = s.nextInt();
			if (motherSequence[i] == 0)
				numzero = i;
		}
		for (int i = 0; i < completeSequence.length; i++) {
			completeSequence[i] = s.nextInt();
		}
		s.close();
		if (length2 >= 2) {
			System.out.println("YES");
		} else {
			boolean b = false;
			motherSequence[numzero] = completeSequence[0];
			for (int i = 1; i < motherSequence.length; i++) {
				if (motherSequence[i - 1] > motherSequence[i]) {
					System.out.println("YES");
					b = true;
					break;
				}
			}
			if (!b)
				System.out.println("NO");
		}

	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author and_so_on
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int index = -1;
            boolean inc = true;
            if (k > 1) {
                out.println("Yes");
                return;
            } else {
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) {
                    arr[i] = in.nextInt();
                    if (arr[i] == 0) {
                        index = i;
                    }
                }
                int num = in.nextInt();
                arr[index] = num;
                int prev = -1;
                for (int i = 0; i < n; i++) {
                    if (arr[i] <= prev) {
                        inc = false;
                        break;
                    }
                    prev = arr[i];
                }
                if (inc) {
                    out.println("No");
                } else {
                    out.println("Yes");
                }
            }
        }

    }
}

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
//        InputStream inputStream = new FileInputStream("dijkstra.in");
        OutputStream outputStream = System.out;
//        OutputStream outputStream = new FileOutputStream("dijkstra.out");
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Answer solver = new Answer();
        solver.solve(in, out);
        out.close();
    }
}

class Answer {
    public void solve(InputReader in, PrintWriter out) throws IOException {
        int n = in.nextInt();
        int k = in.nextInt();

        int[] a = new int[n];
        List<Integer> pzero = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            a[i] = in.nextInt();
            if (a[i] == 0) {
                pzero.add(i);
            }
        }

        List<Integer> b = new ArrayList<>();
        for (int i = 0; i < k; i++) {
            int x = in.nextInt();
            b.add(x);
        }

        Collections.sort(b);

        int j = pzero.size() - 1;
        int i = 0;
        while (j >= 0) {
            a[pzero.get(i)] = b.get(j);
            j--;
            i++;
        }

        for (int ii = 0; ii < n - 1; ii++) {
            if (a[ii] > a[ii + 1]) {
                out.print("Yes");
                return;
            }
        }

        out.print("No");
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }
}

import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Saw {

    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int a[]=new int[n];
        int z=in.nextInt();
        int b[]=new int[z];
        int asort[]=new int[n];
        int ind[]=new int[z];
        int e=0;
        for(int i=0;i<n;i++)
        {
            a[i]=in.nextInt();
            if(a[i]==0)
            {
                ind[e]=i;

                ++e;
            }
        }
       for(int i=0;i<z;i++)
        {
            b[i]=in.nextInt();
        }
       Arrays.sort(b);
       boolean f=false;
      for(int i=0,k=b.length-1;i<ind.length;i++,k--)
      {
          a[ind[i]]=b[k];
          if(a[i]>a[i+1])
          { f=true;
          break;
          }
      }

      if(f)
      {
          System.out.println("Yes");
      }
      else
      {
         asort= Arrays.copyOf(a, n);
        Arrays.sort(asort);
        boolean e2=true;
        for(int i=0;i<a.length;i++)
        {
            if(asort[i]!=a[i])
            {
                System.out.println("Yes");
                e2=true;
                break;
            }
            else
            {
              e2=false;
            }
        }
        if(e2==false)
              System.out.println("No");
      }
    }

}

import java.io.*;
import java.util.*;

public class A1008 {
    public static void main(String [] args) /*throws Exception*/ {
        InputStream inputReader = System.in;
        OutputStream outputReader = System.out;
        InputReader in = new InputReader(inputReader);//new InputReader(new FileInputStream(new File("input.txt")));new InputReader(inputReader);
        PrintWriter out = new PrintWriter(outputReader);//new PrintWriter(new FileOutputStream(new File("output.txt")));
        Algorithm solver = new Algorithm();
        solver.solve(in, out);
        out.close();
    }
}

class Algorithm {
    void solve(InputReader ir, PrintWriter pw) {

        int n = ir.nextInt(), k = ir.nextInt();
        int [] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ir.nextInt();

        int [] b = new int[k];
        for (int i = 0; i < k; i++) b[i] = ir.nextInt();

        if (k >= 2) {
            pw.print("Yes");
            return;
        }
        else {

            for (int i = 0; i < n; i++) {
                if (a[i] == 0) {
                    a[i] = b[0];
                    break;
                }
            }
            for (int i = 1; i < n; i++) {
                if (a[i - 1] > a[i]) {
                    pw.print("Yes");
                    return;
                }
            }

        }

        pw.print("No");

    }

    private static void Qsort(int[] array, int low, int high) {

        int i = low;
        int j = high;
        int x = array[low + (high - low) / 2];

        do {
            while (array[i] < x) ++i;
            while (array[j] > x) --j;
            if (i <= j) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
                i++;
                j--;
            }
        } while (i <= j);

        if (low < j) Qsort(array, low, j);
        if (i < high) Qsort(array, i, high);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    String nextLine(){
        String fullLine = null;
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                fullLine = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return fullLine;
        }
        return fullLine;
    }

    String [] toArray() {
        return nextLine().split(" ");
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
    double nextDouble() {
        return Double.parseDouble(next());
    }
    long nextLong() {
        return Long.parseLong(next());
    }

}

import java.util.Scanner;

/**
 * Created by yuu on 2/7/17.
 */
public class Problem814A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] first = new int[n];
        int second = 0;
        if (k > 1) System.out.println("Yes");
        else {
            int zero = -1;
            boolean increasing = true;
            for (int i = 0; i < n; i++) {
                first[i] = sc.nextInt();
                if (first[i] == 0) zero = i;
                else {
                    if (zero == -1 && i > 0 && zero != i - 1 && first[i] < first[i-1]) increasing = false;
                }
            }
            second = sc.nextInt();
            if (!increasing || (zero != 0 && first[zero-1] > second)
                    || zero != n-1 && first[zero+1] < second)
                System.out.println("Yes");
            else System.out.println("No");
        }
    }
}

import java.util.HashMap;
import java.util.Scanner;

import javafx.util.Pair;

public class A814 {

	public static int[] getArray(int size) {
		int[] array = new int[size];
		for (int i = 0; i < size; i++) {
			array[i] = sr.nextInt();
		}
		return array;
	}

	public static int[][] getMatrix(int sizeI, int sizeJ) {
		int[][] array = new int[sizeI][sizeJ];
		for (int i = 0; i < sizeI; i++) {
			for (int j = 0; j < sizeJ; j++) {
				array[i][j] = sr.nextInt();
			}
		}
		return array;
	}

	public static boolean isSimpleNumber(int val) {
		for (int i = 2; i <= Math.sqrt(val); i++) {
			if (val % i == 0)
				return false;
		}
		return true;
	}

	public static int NOD(int a, int b) {
		while (a != 0 && b != 0) {
			if (a > b) {
				a = a % b;
			} else {
				b = b % a;
			}
		}
		return a + b;
	}

	public static int NOK(int a, int b) {
		return a * b / NOD(a, b);
	}

	public static long factorial(int i) {
		long res = 1;
		for (int j = 2; j <= i; j++) {
			res *= j;
		}
		return res;
	}

	static char letters[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
			's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };

	static Scanner sr = new Scanner(System.in);

	public static void main(String[] args) {

		int n = sr.nextInt();
		int k = sr.nextInt();
		int a[] = getArray(n);
		int b[] = getArray(k);
		boolean isOK;
		if (b.length > 1 && b[0] != b[1]) {
			isOK = true;
		} else {
			boolean isSorted = true;
			if (a[0] == 0) {
				a[0] = b[0];
			}
			for (int i = 1; i < a.length; i++) {
				if (a[i] == 0) {
					a[i] = b[0];
				}
				if (a[i] < a[i - 1]) {
					isSorted = false;
					break;
				}
			}
			isOK = !isSorted;
		}
		System.out.println(isOK ? "YES" : "NO");
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastInput in = new FastInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastInput in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            int last = -1;
            for (int i = 0; i < n; ++i) {
                a[i] = in.nextInt();
                if (a[i] == 0) last = i;
            }
            int[] b = new int[k];
            for (int i = 0; i < k; ++i) {
                b[i] = in.nextInt();
            }

            if (k > 1) {
                out.print("Yes");
            } else {
                a[last] = b[0];
                boolean valid = false;
                for (int i = 1; i < n; ++i) {
                    if (a[i] <= a[i - 1]) {
                        valid = true;
                        break;
                    }
                }
                if (valid) out.print("Yes");
                else out.print("No");
            }
        }

    }

    static class FastInput {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastInput(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.*;
import java.io.*;
import java.math.*;

public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    Integer[] in = Arrays.stream(br.readLine().split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
    int n=in[0];
    int k=in[1];
    Integer[] a = Arrays.stream(br.readLine().split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
    Integer[] b = Arrays.stream(br.readLine().split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
    if(b.length>1){
      System.out.println("Yes");
      return ;
    }
    boolean increasing = true;
    for(int i=0;i<a.length;i++){
      if(a[i]==0){
        a[i] = b[0];
      }
      increasing = a[i] - (i>0?a[i-1]:0) > 0 && increasing;
    }
    if (increasing) {
      System.out.println("No");
    }else{
      System.out.println("Yes");
    }
  }
}

import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import java.io.*;

public class Main {
    public void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();
        int[] a = new int[n];
        int[] b = new int[m];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        for (int i = 0; i < m; i++) {
            b[i] = nextInt();
        }
        int t = 0;
        int x = 0;
        for (int i = 0; i < n; i++) {
            if (a[i] == 0) {
                t++;
            }
            if (i != 0 && a[i] * a[i - 1] != 0) {
                if (a[i - 1] >= a[i]) {
                    x = 1;
                }
            }
        }
        if (x == 1 || t > 1) {
            out.print("YES");
        } else {
            if (t == 0) {
                if (x == 1) {
                    out.print("YES");
                } else {
                    out.print("NO");
                }
            } else {
                if (t == 1) {
                    for (int i = 0; i < n; i++) {
                        if (a[i] == 0){
                            boolean r = true;
                            for(int j = 0; j < m; j++){
                                if(i != 0 && a[i - 1] > b[j] || i != n - 1 && a[i + 1] <= b[j]){
                                    r = false;
                                    break;
                                }
                            }
                            if(!r){
                                out.print("YES");
                            }else {
                                out.print("NO");
                            }
                        }
                    }
                }
            }
        }
    }

    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

    public Integer nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public static void main(String[] args) throws IOException {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception e) {
        }
        new Main().run();
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
//            br = new BufferedReader(new FileReader("lesson.in"));
//            out = new PrintWriter(new File("lesson.out"));
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

import java.util.*;

public class Answer
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    int A[]=new int[n];
    int B[]=new int[k];

    String stat="No";
    for(int i=0;i<n;i++)
      A[i]=sc.nextInt();
    for(int i=0;i<k;i++)
      B[i]=sc.nextInt();
    Arrays.sort(B);
   int s=k-1;
    for(int i=0;i<n;i++)
    {
      if(A[i]==0)
      {
        A[i]=B[s--];
      }
    }
    for(int i=0;i<n-1;i++)
    {
      if(A[i]>=A[i+1])
      {
        stat="Yes";
        break;
      }
    }
    System.out.println(stat);

  }
}

import java.util.*;
import java.io.*;

   public  class Sample implements Runnable{
    static ArrayList<Integer>[] al;
         static class Pair implements Comparator<Pair>{
  int a;
  int b;
  Pair(){

  }
  Pair(int a,int b){
    this.a=a;
    this.b=b;
  }
  public int compare(Pair p1,Pair p2){

    return p2.b-p1.b;
 }
}
  static class Beauty implements Comparator<Beauty>{
    int beauty;
    int cost;
    Beauty(){
        }
    Beauty(int beauty,int cost){
      this.beauty=beauty;
      this.cost=cost;

    }
    public int compare(Beauty b1,Beauty b2 ){
      if(b2.beauty-b1.beauty==0){
        return b1.cost-b2.cost;
      }else{
        return b2.beauty-b1.beauty;
      }
    }

  }

   static InputReader sc = new InputReader();
   static int gcd(int a,int b){
    if(a==0){
      return b;
    }
    return gcd(b%a,a);
   }
   static int d;
   static int[] color;
   static boolean[] v;
  /*  static void dfs(int src,int x,int y){
      v[src]=true;
     int  i=1;
     color[src]=x;
      for(int a :al[src]){
        if(v[a]) continue;
        if(i==x|| i==y){
          i++;
          if(i==x|| i==y){
          i++;
        }
        }
        color[a]=i;
        i++;

      }
      for(int a:al[src]){
        if(!v[a]){
          dfs(a,color[a],x);
        }
      }

    }*/
    static long[] a;
    static long[] b;
    public static boolean possible(double mid,int n){
      double l=a[1]-b[1]*mid;
      double r=a[1]+b[1]*mid;
      for(int i=2;i<=n;i++){
        l=Math.max(l,a[i]-b[i]*mid);
        r=Math.min(r,a[i]+b[i]*mid);

      }
      if(l>r)return false;
      else  return true;
    }

public static boolean isvowel(char ch){
    if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){
        return true;
    }else{
        return false;
    }
}
static long[] fac;
 static long[] inv;
 static long mod=(long)1e9+7;
static int[] prime;
static Integer[] ans;

static ArrayList<Integer>[] al1;
static ArrayList<Integer>[] al2;
static int[] lol1;
static int[] lol2;
static boolean[] v1;
static boolean[] v2;

     public static void main(String args[]) throws IOException
    {
         new Thread(null, new Sample(), "whatever", 1<<26).start();

    }

     boolean findSum(int set[], int n, long sum)
    {
       // Base Cases
       if (sum == 0)
         return true;
       if (n == 0 && sum != 0)
         return false;

       // If last element is greater than sum, then ignore it
       if (set[n-1] > sum)
         return findSum(set, n-1, sum);

       /* else, check if sum can be obtained by any of the following
          (a) including the last element
          (b) excluding the last element   */
       return findSum(set, n-1, sum) ||
                                   findSum(set, n-1, sum-set[n-1]);
    }

  public class IntegerComparator implements Comparator<Integer> {

    @Override
    public int compare(Integer o1, Integer o2) {
        return o2.compareTo(o1);
    }
}

    public void run(){
             int n=i();
             int k=i();
             int[] a=new int[n];
             int[] b=new int[k];
             for (int i=0;i<n ;i++ ) {
                a[i]=i();
              }
            for (int i=0;i<k ;i++ ) {
                b[i]=i();
              }
            Arrays.sort(b);
            for (int i=0,j=k-1;i<n ;i++ ) {
                if(a[i]==0){
                  a[i]=b[j];
                  j--;
                }
              }
            int flag=0;
            for (int i=1;i<n ;i++ ) {
                if(a[i]<a[i-1]){
                  flag=1;
                  break;
                }
              }
            if(flag==1){
              System.out.println("YES");
            }
            else{
              System.out.println("NO");
            }

       }
       public static boolean binarySearch(long[] a,int low,int high,long key){

        if(low>high){
          return false;
        }else{
          int mid=(low+high)/2;
          if(a[mid]==key){
            return true;
          }else if(a[mid]<key){
            return binarySearch(a,mid+1,high,key);
          }
          else{
            return binarySearch(a,low,mid-1,key);
          }
        }

       }
      public static int upper_bound_array(long[] arr, long key) {
    int len = arr.length;
    int lo = 0;
    int hi = len-1;
    int mid = (lo + hi)/2;
    while (true) {
      int cmp = Long.compare(arr[mid],(key));
      if (cmp == 0 || cmp < 0) {
        lo = mid+1;
        if (hi < lo)
          return mid<len-1?mid+1:-1;
      } else {
        hi = mid-1;
        if (hi < lo)
          return mid;
      }
      mid = (lo + hi)/2;
    }
  }

    /////////////////////////////////////////////////////////// shortcuts //////////////////////////////
      public static long modPow(long base, long exp, long mod) {
        base = base % mod;
        long result = 1;
        while (exp > 0) {
            if (exp % 2 == 1) {
                result = (result * base) % mod;
                exp--;
            } else {
                base = (base * base) % mod;
                exp = exp >> 1;
            }

        }
        return result;
    }

    public static void cal() {
        fac = new long[1000005];
        inv = new long[1000005];
        fac[0] = 1;
        inv[0] = 1;
        for (int i = 1; i <= 1000000; i++) {
            fac[i] = (fac[i - 1] * i) % mod;
            inv[i] = (inv[i - 1] * modPow(i, mod - 2, mod)) % mod;
        }
    }

   /* public static long ncr(int n, int r) {
        return (((fac[n] * inv[r]) % mod) * inv[n - r]) % mod;
    }
 */

      static int i() {

          return sc.nextInt();
        }
        static long l(){
          return sc.nextLong();

        }
        static double d() throws IOException{
          return sc.nextDouble();
        }
        static String s(){
          return sc.next();

        }
        static String sL() throws IOException{
          return sc.nextLine();
        }
       static void loop(int[] a) throws IOException{
          for(int j=0;j<a.length;j++){
              a[j]=i();
          }
        }
        static void eloop(int[] a) throws IOException{
          for(int i=1;i<=a.length;i++){
              a[i]=i();
          }
        }
        static void ploop(int[] a)throws IOException{
             for(int j=0;j<a.length;j++){
                System.out.println(a[j]);
             }

        }
        static void eploop(int[] a)throws IOException{
             for(int j=1;j<=a.length;j++){
                System.out.println(a[j]);
             }

        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////

  static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                throw new RuntimeException();
            }
            return str;
        }
    }

 }

import java.io.*;
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		while (sc.hasNext()) {
			int n=sc.nextInt();
			int k=sc.nextInt();
			int[]shu=new int[n];
			Integer[]t=new Integer[k];
			int num=0;
			int index=-1;
			HashSet<Integer>set=new HashSet<Integer>();
			for(int i=0;i<n;i++){
				shu[i]=sc.nextInt();
				if(shu[i]!=0)set.add(shu[i]);
				else index=i;
			}
			boolean flag=true;
			for(int i=0;i<k;i++){
				t[i]=sc.nextInt();
				if(set.contains(t[i]))flag=false;
			}
			if(k>=2){
				pw.println("Yes");
			}else{
				shu[index]=t[0];
				boolean h=false;
				for(int i=0;i<n-1;i++){
					if(shu[i+1]<shu[i])h=true;
				}
				if(h)pw.println("Yes");
				else pw.println("No");
			}
			pw.flush();
		}
	}
}

class FastScanner {
	BufferedReader br;
	StringTokenizer st;

	public FastScanner() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			st = new StringTokenizer("");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public boolean hasNext() {
		while (!st.hasMoreTokens()) {
			String line = nextLine();
			if (line == null) {
				return false;
			}
			st = new StringTokenizer(line);
		}
		return true;
	}

	public String next() {
		while(!st.hasMoreTokens()){
			st=new StringTokenizer(nextLine());
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}

	public String nextLine() {
		String line = "";
		try {
			line = br.readLine();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return line;
	}
}

import java.util.Scanner;
//import java.util.Arrays;
public class Solution {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int k = s.nextInt();

		int[]org = new int[n];
		int[]sho = new int[k];

		for(int i=0;i<n;i++){
			org[i] = s.nextInt();
		}
		for(int i=0;i<k;i++){
			sho[i] = s.nextInt();
		}
		int flag=0;
		if(k>=2){
			System.out.println("Yes");flag=1;
		}
		else{
			for(int i=0;i<n;i++){
				if(org[i]==0){
					org[i]=sho[0];break;
				}
			}
			for(int i=0;i<n-1;i++){
				if(org[i+1] < org[i]){
					System.out.println("Yes");
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("No");
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();
            int[] b = new int[k];
            int lst = -1;
            boolean fl = false;
            for (int i = 0; i < k; i++) {
                int cur = in.nextInt();
                if (lst == 0 && cur == 0)
                    fl = true;
                lst = cur;
                b[i] = cur;
            }
            if (fl)
                out.println("Yes");
            else {
                for (int i = 0; i < n; i++)
                    if (a[i] == 0) {
                        int last;
                        if (i > 0)
                            last = a[i - 1];
                        else
                            last = Integer.MIN_VALUE;
                        int next;
                        if (i + 1 < n)
                            next = a[i + 1];
                        else
                            next = Integer.MAX_VALUE;
                        for (int j = 0; j < k; j++)
                            if (last > b[j] || b[j] > next) {
                                out.println("Yes");
                                return;
                            }
                    }
                for (int i = 0; i < n - 1; i++)
                    if (a[i] != 0 && a[i + 1] != 0 && a[i] > a[i + 1]) {
                        out.println("Yes");
                        return;
                    }
                out.println("No");
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.util.Scanner;

public class AnabondonedSentimentFromPast {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr = new int[n];
		int[] brr = new int[k];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		for(int i=0; i<k;i++)brr[i] = input.nextInt();
		if(k>=2){
			System.out.println("Yes");
			return;
		}

		int index = -1;
		int i=0;
		while(i<n){
			if(arr[i]==0){
				index = i;
				break;
			}
			i++;

		}
		arr[index] = brr[0];
		for( i=1; i<n;i++){
			if(arr[i]<arr[i-1]){
				System.out.println("Yes");
				return;
			}
		}
		System.out.println("No");
	}

}

import java.util.Arrays;
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		new A();
	}

	int a[],aLen,b[],bLen;

	A() {

		Scanner in = new Scanner(System.in);

		aLen = in.nextInt();
		bLen = in.nextInt();
		a = new int[aLen];
		b = new int[bLen];

		for(int i=0;i<aLen;i++){
			a[i] = in.nextInt();
		}

		for(int i=0;i<bLen;i++){
			b[i] = in.nextInt();
		}

		if(bLen>1){
			System.out.println("Yes");
			System.exit(0);
		}else if(bLen==1){
			if(!increasing(a)){
				System.out.println("Yes");
				System.exit(0);
			}
			Arrays.sort(b);
			for(int i=0;i<aLen;i++){
				if(a[i]!=0)
					continue;
				if((i>0 && b[0]<=a[i-1]) || (i<aLen-1 && b[bLen-1]>=a[i+1])){
					System.out.println("Yes");
					System.exit(0);
				}
			}
			System.out.println("No");
			System.exit(0);
		}

		in.close();

	}

	boolean increasing(int a[]){
		int i,prev=0;
		for(i=0;i<a.length;i++){
			if(a[i]!=0){
				prev = a[i++];
				break;
			}
		}
		for(;i<a.length;i++){
			if(a[i]==0)
				continue;
			if(a[i]<=prev)
				return false;
			prev = a[i];
		}
		return true;
	}

}

/*

4 2
11 0 0 14
5 4

6 1
2 3 0 8 9 10
5

4 1
8 94 0 4
89

7 7
0 0 0 0 0 0 0
1 2 3 4 5 6 7

5 1
0 5 8 6 12
4

6 5
0 0 0 0 0 5
1 8 6 5 7

Break cases: Should be yes, yes. Because sequences already nonincreasing.

3 1
0 8 5
4

3 1
8 5 0
12

 */

import java.util.*;

public class ProblemA
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    int A[]=new int[n];
    int B[]=new int[k];

    String flag="No";
    for(int i=0;i<n;i++)
      A[i]=sc.nextInt();
    for(int i=0;i<k;i++)
      B[i]=sc.nextInt();
    Arrays.sort(B);
   int s=k-1;
    for(int i=0;i<n;i++)
    {
      if(A[i]==0)
      {
        A[i]=B[s--];
      }
    }
    for(int i=0;i<n-1;i++)
    {
      if(A[i]>=A[i+1])
      {
        flag="Yes";
        break;
      }
    }
    System.out.println(flag);

  }
}

import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public  class FibinacciSeries
{

	   static class FastReader
	    {
	        BufferedReader br;
	        StringTokenizer st;

	        public FastReader()
	        {
	            br = new BufferedReader(new
	                     InputStreamReader(System.in));
	        }

	        String next()
	        {
	            while (st == null || !st.hasMoreTokens())
	            {
	                try
	                {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException  e)
	                {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();

	        }

	        int nextInt()
	        {
	            return Integer.parseInt(next());
	        }

	        long nextLong()
	        {
	            return Long.parseLong(next());
	        }

	        double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }

	        String nextLine()
	        {
	            String str = "";
	            try
	            {
	                str = br.readLine();
	            }
	            catch (IOException e)
	            {
	                e.printStackTrace();
	            }
	            return str;
	        }

			public Character charAt(int i) {
				// TODO Auto-generated method stub
				return null;
			}
	    }

	  // Complete the hurdleRace function below.
//    public static void solve() {
//    	FastReader s=new FastReader();

    public static void main(String[] args) throws IOException {
    	FastReader s=new FastReader();

    	int na = s.nextInt();
    	int nb = s.nextInt();
    	int[] a =  new int[na];
    	int[] b = new int[nb];
    	int pos = 0,flag=0,p=0;
    	for(int i=0;i<na ;i++) {
    		a[i] = s.nextInt();
    		if(a[i]==0) {
    			pos=i;

    		}
    	}
    	for(int i=0;i<nb;i++) {
    		b[i] = s.nextInt();

       	}
    	boolean f =false;
    	if(nb>1)System.out.println("YES");
    	else {
    		a[pos]=b[0];

    		for(int i=1;i<na ;i++) {

    			if(a[i]<=a[i-1]) {

    				f=true;
    				break;
    			}
    		}
    		if(f==false)System.out.println("NO");
    		else System.out.println("YES");
    	}

    }
}

import java.util.*;
public class AnAbandonedSentimentFromPast {
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();

        int a[]=new int[n];
        Integer b[]=new Integer[k];

        for(int i=0;i<n;i++)
            a[i]=sc.nextInt();
        for(int i=0;i<k;i++)
            b[i]=sc.nextInt();

        Arrays.sort(b,Collections.reverseOrder());
        for(int i=0,j=0;i<n && j<k;i++){
            if(a[i]==0){
                a[i]=b[j];
                j++;
            }
        }

        int c[]=new int[n];
        boolean flag=true;
        for(int i=0;i<n;i++){
            c[i]=a[i];
            if(a[i]==0){
                flag=false;
                break;
            }
        }
        if(flag==false)
            System.out.println("No");

        boolean flag2=true;
        Arrays.sort(c);
        for(int i=0;i<n;i++){
            if(c[i]!=a[i]){
                flag2=false;
                break;
            }
        }
        if(flag2==false)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}

import java.util.*;
public class Main{
public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt(), k = sc.nextInt();
		if(k>1){
			System.out.println("Yes");
		}
		else{
			int a[] = new int[n];
			int temp=0;
			for(int i=0;i<n;i++){
				a[i] = sc.nextInt();
				if(a[i] == 0)
				temp = i;
			}
			a[temp] = sc.nextInt();
			int index = 0;
			while(index < n-1 && a[index+1] > a[index]){
				index++;
			}
			System.out.println( index == n-1 ? "No" : "Yes");
		}
	}
}

import java.util.*;
import java.io.*;

public class test{
    public static void main(String args[]){
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        int[] a=new int[n];
        int[] b=new int[k];

        for(int i=0;i<n;i++)       a[i]=sc.nextInt();

        b[0]=sc.nextInt();
        boolean ans=false;
        for(int i=1;i<k;i++){
            b[i]=sc.nextInt();
            if(b[i]!=b[0]) ans=true;
        }

        if(ans) System.out.print("YES");

        else{
            int j=0;
            for(int i=0;i<n;i++){
                if(a[i]==0){
                    a[i]=b[j];
                    j++;
                }
            }
            for(int i=0;i<n-1;i++){
                if(a[i]>a[i+1]) ans=true;
            }

            if(ans) System.out.print("YES");
            else    System.out.print("NO");
        }
    }
}

import java.util.*;
public class Main
{
    public static void main(String args[])
    {
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        int k=sc.nextInt();
        int arr[]=new int[n];
        Map<Integer,Integer> map=new HashMap<Integer,Integer>();
        for(int i=0;i<n;i++)
        {
            arr[i]=sc.nextInt();
            map.put(arr[i],i);
        }
        if(k==1)
        {
            int b=sc.nextInt();
            int index=map.get(0);
            arr[index]=b;
            boolean x=true;
            for(int i=0;i<n-1;i++)
            {
                if(arr[i]>arr[i+1])
                {
                    x=false;
                    break;
                }
            }
            if(!x)
            {
                System.out.println("YES");
            }
            else{
                System.out.println("NO");
            }
        }
        else{
            int b[]=new int[k];
            for(int i=0;i<k;i++)
            {
                b[i]=sc.nextInt();
            }
            System.out.println("YES");
        }
    }
}

import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
    static class Reader
    {
        private InputStream mIs;private byte[] buf = new byte[1024];private int curChar,numChars;public Reader() { this(System.in); }public Reader(InputStream is) { mIs = is;}
        public int read() {if (numChars == -1) throw new InputMismatchException();if (curChar >= numChars) {curChar = 0;try { numChars = mIs.read(buf);} catch (IOException e) { throw new InputMismatchException();}if (numChars <= 0) return -1; }return buf[curChar++];}
        public String nextLine(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isEndOfLine(c));return res.toString() ;}
        public String s(){int c = read();while (isSpaceChar(c)) c = read();StringBuilder res = new StringBuilder();do {res.appendCodePoint(c);c = read();}while (!isSpaceChar(c));return res.toString();}
        public long l(){int c = read();while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }long res = 0; do{ if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read();}while(!isSpaceChar(c));return res * sgn;}
        public int i(){int c = read() ;while (isSpaceChar(c)) c = read();int sgn = 1;if (c == '-') { sgn = -1 ; c = read() ; }int res = 0;do{if (c < '0' || c > '9') throw new InputMismatchException();res *= 10 ; res += c - '0' ; c = read() ;}while(!isSpaceChar(c));return res * sgn;}
        public double d() throws IOException {return Double.parseDouble(s()) ;}
        public boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; }
        public boolean isEndOfLine(int c) { return c == '\n' || c == '\r' || c == -1; }
    }

    ///////////////////////////////////////////////////////////////////////////////////////////
    //    RRRRRRRRR            AAA             HHH     HHH     IIIIIIIIIIIII   LLL           //
    //    RR    RRR           AAAAA            HHH     HHH      IIIIIIIIIII    LLL           //
    //    RR   RRR           AAAAAAA           HHH     HHH          III        LLL           //
    //    RR  RRR           AAA   AAA          HHHHHHHHHHH          III        LLL           //
    //    RRRRRR           AAA     AAA         HHHHHHHHHHH          III        LLL           //
    //    RR  RRR         AAAAAAAAAAAAA        HHH     HHH          III        LLL           //
    //    RR    RRR      AAA         AAA       HHH     HHH      IIIIIIIIIII    LLLLLLLLLLLL  //
    //    RR     RRR    AAA           AAA      HHH     HHH     IIIIIIIIIIIII   LLLLLLLLLLLL  //
    ///////////////////////////////////////////////////////////////////////////////////////////
    static int n;
    static int k;
    static int arr[];
    public static void main(String[] args)throws IOException
    {
        PrintWriter out= new PrintWriter(System.out);
        Reader sc=new Reader();
        int n=sc.i();
        int k=sc.i();
        int arr[]=new int[n];int brr[]=new int[k];
        for(int i=0;i<n;i++)arr[i]=sc.i();
        for(int i=0;i<k;i++)brr[i]=sc.i();
        if(k!=1)
        System.out.println("YES");
        else
        {
            for(int i=0;i<n;i++)
            {
                if(arr[i]==0)
                arr[i]=brr[0];
            }
            for(int i=1;i<n;i++)
            {
                if(arr[i]<=arr[i-1])
                {
                    System.out.println("YES");
                    System.exit(0);
                }
            }
            System.out.println("NO");
        }
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alexander Tsupko (alexander.tsupko@outlook.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt(), k = in.nextInt();
            int[] a = in.nextIntArray(n), b = in.nextIntArray(k);
            Arrays.sort(b);
            for (int i = 0, j = --k; i < n; ++i) if (a[i] == 0) a[i] = b[j--];
            boolean ok = false;
            for (int i = 1; i < n; ++i)
                if (a[i - 1] > a[i]) {
                    ok = true;
                    break;
                }
            out.print(ok ? "Yes" : "No");
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buffer = new byte[1024];
        private int current;
        private int size;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (size == -1) throw new InputMismatchException();
            if (current >= size) {
                current = 0;
                try {
                    size = stream.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (size <= 0) return -1;
            }
            return buffer[current++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceCharacter(c)) c = read();
            int sign = 1;
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                result *= 10;
                result += c - '0';
                c = read();
            } while (!isSpaceCharacter(c));
            return result * sign;
        }

        private boolean isSpaceCharacter(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) array[i] = nextInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void print(String s) {
            writer.print(s);
        }

    }
}

import com.sun.jdi.ArrayReference;
import com.sun.source.tree.WhileLoopTree;

import java.io.*;
import java.util.*;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

public class CP {
    static long startTime;
    static long endTime;
    static Boolean [] prime ;
    static Scanner sc = new Scanner(System.in);
    static class FastReader{
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
    public static int lowerBound
            (Integer[] array, int length, int value) {
        int l = 0;
        int r = length;
        while (l < r) {
            int mid = (l + r) / 2;
            if (value < array[mid]) {
                r = mid;
            } else {
                l = mid + 1;
            }
        }
        return l;
    }
    public static long gcd(long a, long b){
        if (b == 0)
            return a;
        else return gcd(b, a % b);
    }
    public  static  long countDivs(long n ){
        int cn=0;
        long sqr = (long)Math.sqrt(n);
        for (long i = 1; i<=sqr ; ++i) {
            if(n%i==0){
                ++cn;
            }
        }
        cn*=2;
        if(sqr*sqr==n) cn--;
        return cn;

    }
    static void prime(int  x) {
        //sieve algorithm. nlog(log(n)).
        prime=new Boolean[ (x+1)];
        Arrays.fill(prime,true);
        prime[0] = prime[1] = false;
        for (int  i = 2; i * i <= x ; i++)
            if (prime[i])
                for (int  j = i * i; j <= x; j += i)
                    prime[j] = false;
    }
    static int[] sum;
    static void cumulitiveSum( int [] arr){
        sum = new int[arr.length];
        sum[0]=arr[0];
        for (int i = 1; i <arr.length; i++) {
            sum[i]=arr[i]+sum[i-1];
        }
    }
    static boolean isEven(long x ){
        return x % 2 == 0;
    }
    static boolean isPrime(long x ){
        boolean flag = true;
        int sqr = (int)Math.sqrt(x);
        if(x<2) return false;
        for (int i = 2; i <=sqr; i++) {
            if(x%i==0){
                flag=false;
                break;
            }
        }
        return flag;
    }
    static int  mex=0;
    static int mecfi(int arr[],int n  ){
        Arrays.sort(arr);
        for (int i = 0; i <n ; i++) {
            if(arr[i]==mex) {
                mex++;
            }
        }
        return mex;
    }
    public static void main(String [] args)   {
        startTime = System.currentTimeMillis();
       // int T = sc.nextInt();while (T--!=0)
        {
            solve();
        }
        endTime = System.currentTimeMillis();
        long duration= endTime-startTime;
        //System.out.println(duration);
    }
    public static void solve()  {
//////////////////////////////////////////////////////////////////////
        int n = sc.nextInt();
        int [] arr =new int [n];
        int m=sc.nextInt();
        int [] arr1 = new int[m];
        int cn=0;
        int in=0;
        for (int i = 0; i < n; i++) {
                arr[i]=sc.nextInt();
                if(arr[i]==0){ cn++; in=i;   }
        }
      //  System.out.println(cn);
        for (int i = 0; i < m; i++) {
            arr1[i]=sc.nextInt();
        }
        if(cn>1){
            System.out.println("Yes");
                return;
        }
        else {
            int x=0;
            if(arr[0]==0){
                arr[0]=arr1[x];
                x++;
            }
            for (int i = 1; i <n ; i++) {
                if(arr[i]==0){
                    arr[i]=arr1[x];
                    x++;
                }
                if(arr[i-1]>=arr[i]){
                    System.out.println("Yes");
                    return;
                }
            }
        }
        System.out.println("No");
///////////////////////////////////////////////////////////////////////
    }

}

import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Task814A {
    private static ArrayList<Integer> a, b, zeroPositions;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n, k;
        n = in.nextInt();
        k = in.nextInt();
        a = new ArrayList<>(n);
        b = new ArrayList<>(k);
        zeroPositions = new ArrayList<>(n);

        int temp;
        for (int i = 0; i < n; ++i) {
            temp = in.nextInt();
            a.add(temp);
            if (temp == 0) {
                zeroPositions.add(i);
            }
        }
        for (int i = 0; i < k; ++i) b.add(in.nextInt());

        if (zeroPositions.size() < k) {
            out.println("No");
        } else if (zeroPositions.size() > 1
                || zeroPositions.size() == 0) {
            out.println("Yes");
        } else {
            /*
            * case when count of zero is 1
            * */
            int pos = zeroPositions.get(0);
            a.set(pos, b.get(0));
            ArrayList<Integer> tempA = new ArrayList<>(a);
            Collections.sort(tempA);

            if (!Arrays.equals(tempA.toArray(), a.toArray())) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }
        out.flush();
    }
}

import java.util.*;
public class AnAbandonedSentimentFromPast {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int arr[]=new int[a];
		int brr[]=new int[b];
		int hold=0,count=0,use=0;
		for(int i=0;i<a;i++) {
			arr[i]=sc.nextInt();
			if(hold==0) {
				hold=arr[i];
			}
			if(hold<=arr[i] && arr[i]!=0) {
				hold=arr[i];
			}
			else if(arr[i]!=0){
				count++;
			}
		}
		for(int i=0;i<b;i++) {
			brr[i]=sc.nextInt();
		}
		if(count>0) {
			System.out.println("YES");
			return;
		}
		else if(b==1) {
			for(int i=0;i<a;i++) {
				if(arr[i]==0) {
					use=i;
					break;
				}
			}
			arr[use]=brr[0];
			if(use!=0 && arr[use-1]>arr[use]) {
				System.out.println("YES");
				return;
			}
			else if(use!=a-1 && arr[use+1]<arr[use]){
				System.out.println("YES");
				return;
			}
			else {
				System.out.println("NO");
			}
		}
		else {
			Arrays.parallelSort(brr);
			for(int i=0;i<b;i++) {
				if(brr[i+1]!=brr[i]) {
					System.out.println("YES");
					return;
				}
			}
			System.out.println("NO");

		}

	}

}

import java.io.*;
import java.util.*;

public class A
{
    static int n, k;
    static int[] arr, brr;
    static char[] s;
    public static void main(String[] args) throws IOException
    {
        Flash f = new Flash();
        n = f.ni(); k = f.ni();
        arr = f.arr(n); brr = f.arr(k);
        System.out.println(fn());
    }

    static String fn()
    {
        sort(brr);
        for(int i = 0, j = k-1; i < n; i++){
            if(arr[i] != 0) continue;
            arr[i] = brr[j--];
        }

        int i;
        for(i = 0; i < n-1; i++){
            if(arr[i] > arr[i+1]) break;
        }

        return i == n-1 ? "NO" : "YES";
    }

    static void sort(int[] a){
        List<Integer> A = new ArrayList<>();
        for(int i : a) A.add(i);
        Collections.sort(A);
        for(int i = 0; i < A.size(); i++) a[i] = A.get(i);
    }

    static int swap(int itself, int dummy){
        return itself;
    }

    static void print(int[] a){
        StringBuilder sb = new StringBuilder();
        for(int i : a) sb.append(i + " ");
        System.out.println(sb);
    }

    //SecondThread
    static class Flash
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer("");

        String next(){
            while(!st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch(IOException e){
                    e.printStackTrace();
                }
            }

            return st.nextToken();
        }

        String nextLine(){
            String s = new String();
            try{
                s = br.readLine().trim();
            }catch(IOException e){
                e.printStackTrace();
            }

            return s;
        }

        int ni(){
            return Integer.parseInt(next());
        }

        int[] arr(int n){
            int[] a = new int[n];
            for(int i = 0; i < n; i++) a[i] = ni();
            return a;
        }

        long nl(){
            return Long.parseLong(next());
        }
    }
}

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

public static void main(String[] args) {
    //solution start :-)
      Scanner sc = new Scanner(System.in);
      int n = sc.nextInt();
		int k = sc.nextInt();
		int a[] = new int[n];
		int b[] = new int[k];
		for(int i=0;i<n;i++) {
			a[i] = sc.nextInt();
		}
		for(int i=0;i<k;i++) {
			b[i] = sc.nextInt();
		}
		Arrays.sort(b);
		int j=0;
		for(int i=0;i<n;i++) {
			if(a[i]==0) {
				a[i] = b[k-j-1];
				j++;
			}
		}
		boolean flag =true;
		for(int i=0;i<(n-1);i++) {
			if(a[i]>a[i+1]) {
				flag = false;
				break;
			}
		}
		if(flag) System.out.println("No");
		else System.out.println("Yes");
    //	solution end \(^-^)/
    //		        |
    //		       / \
}}

import java.util.*;
import java.io.*;
public class Round418q1{
  static class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader(){
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    int nextInt(){
      return Integer.parseInt(next());
    }
    String next(){
      while(st==null || !st.hasMoreElements()){
        try{
          st = new StringTokenizer(br.readLine());
        }
        catch (IOException e){
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

  }

  static ArrayList<Integer> kList;
  static int greatestLesThanNum;
  public static void main(String[] args) throws IOException{
    FastReader fr = new FastReader();
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    int  n = fr.nextInt();
    int k = fr.nextInt();
    ArrayList<Integer> list = new ArrayList<>();
    HashSet<Integer> uniqueKList = new HashSet<>();
    kList = new ArrayList<>();
    for(int i=0;i<n;i++){
      list.add(fr.nextInt());
    }
    for(int j=0;j<k;j++){
      kList.add(fr.nextInt());
      if(!uniqueKList.add(kList.get(kList.size()-1))){
        out.write("No\n");
        out.flush();
        return;
      }

    }
    Collections.sort(kList);
    for(int i=0;i<n;i++){
      if(list.get(i)==0){
        if(i==0){
          list.set(0, kList.get(kList.size()-1));
          kList.remove(kList.size()-1);
        }
        else{
          greatestLesThanNum = -1;
          int num = searchLessThan(list.get(i-1),0,kList.size()-1);
          if(num==-1){
            num = kList.get(kList.size()-1);
            kList.remove(kList.size()-1);
          }
          list.set(i,num);
        }
      }
    }
    String ans = "No";
    for(int i=1;i<n;i++){
      //System.out.println(list.get(i)+" "+ list.get(i-1));

      if(list.get(i)< list.get(i-1)){
        ans = "Yes";
      }
    }
    out.write(ans+"\n");
    out.flush();
  }

  static int searchLessThan(int n, int start, int end){
    if(start>end){
      return -1;
    }
    int mid = (start+end)/2;

    if(kList.get(mid)>n && (mid+1<=end && kList.get(mid+1)<n)){
      int temp = kList.get(mid);
      kList.remove(mid);
      return temp;
    }
    if(kList.get(mid)<=n){
      return searchLessThan(n, mid+1, end);
    }
    if(kList.get(mid)>n)
      return searchLessThan(n, start, mid-1);
    return -1;
  }
}

import java.util.*;
import java.io.*;
public class sequence {
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      StringTokenizer str = new StringTokenizer(sc.nextLine());
      int a = Integer.parseInt(str.nextToken());
      int b = Integer.parseInt(str.nextToken());

      int[] h = new int[a];
      str = new StringTokenizer(sc.nextLine());
      for(int i = 0; i < a; i++){
          h[i] = Integer.parseInt(str.nextToken());
      }

      int[] reverse = new int[b];
      str = new StringTokenizer(sc.nextLine());
      for(int i = 0; i < b; i++){
         reverse[i] = Integer.parseInt(str.nextToken());
      }
      int[] k = new int[b];
      for(int i = 0; i < k.length; i++){
         k[i] = reverse[b-i-1];
      }
      int index = 0;
      for(int i = 0; i < h.length; i++){
         if(h[i] == 0){
            h[i] = k[index];
            index++;
         }
      }

      boolean increasing = true;
      for(int i = 1; i < h.length; i++){
         if(h[i-1] > h[i]){
            increasing = false;
          }
      }
      if(increasing)
         System.out.println("No");
      else
         System.out.println("Yes");
   }
}

import java.text.ParseException;
import java.util.Scanner;

public class MainA {

	public static void main(String[] args) throws ParseException {
		Scanner in = new Scanner(System.in);
		String[] array = in.nextLine().split(" ");
		int numAll = Integer.parseInt(array[0]);
		int zero = Integer.parseInt(array[1]);
		array = in.nextLine().split(" ");
		String[] zeroArr = in.nextLine().split(" ");
		if(zero != 1)
			System.out.println("YES");
		else {
//			boolean flag = true;
//			for(int i=0; i<numAll; i++) {
//				int temp = Integer.parseInt(array[i]);
//				if(temp == 0) {
//					flag = false;
//					continue;
//				}
//				if( flag && temp > Integer.parseInt(zeroArr[0])) {
//					System.out.println("YES");
//					return;
//				}else if( !flag && temp < Integer.parseInt(zeroArr[0])){
//					System.out.println("YES");
//					return;
//				}
//			}
//			System.out.println("NO");
			int zeroNum = Integer.parseInt(zeroArr[0]);
			for(int i=0; i<numAll-1; i++) {
				int temp = Integer.parseInt(array[i]);
				int temp1 = Integer.parseInt(array[i+1]);
				if(temp != 0 && temp1 != 0 && temp > temp1) {
					System.out.println("YES");
					System.out.println(1);
					return;
				}else if(temp == 0) {
					array[i] = zeroArr[0];
					if(zeroNum > temp1) {
						System.out.println("YES");
						System.out.println(2);
						return;
					}
				}else if(temp1 == 0) {
					array[i+1] = zeroArr[0];
					if(temp > zeroNum) {
						System.out.println("YES");
						System.out.println(3);
						return;
					}
				}
			}
			System.out.println("NO");
		}
		in.close();
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt(), m = scan.nextInt();
		int[] a = scan.nextIntArray(n);
		int[] b = scan.nextIntArray(m);
		if(n == m){
			out.println("Yes");
			out.close();
			return;
		}
		boolean good = false;
		for(int i = 0; i < n-1; i++) {
			if(a[i] != 0 && a[i+1] != 0 && a[i] > a[i+1]) good = false;
			if(a[i] == 0){
				int k = -1;
				for(int j = 0; j < m; j++) if(a[i+1] != 0 && a[i+1] < b[j] || i > 0 && a[i-1] != 0 && a[i-1] > b[j])k = j;
				if(k != -1) good = true;
			}
		}
		if(a[n-1] == 0){
			int k = -1;
			for(int j = 0; j < m; j++) if(a[n-2] != 0 && a[n-2] > b[j])k = j;
			if(k != -1) good = true;
		}
		out.print(good?"Yes":"No");
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();
            int[] b = new int[k];
            int lst = -1;
            boolean fl = false;
            for (int i = 0; i < k; i++) {
                int cur = in.nextInt();
                if (lst == 0 && cur == 0)
                    fl = true;
                lst = cur;
                b[i] = cur;
            }
            if (fl)
                out.println("Yes");
            else {
                for (int i = 0; i < n; i++)
                    if (a[i] == 0) {
                        int last;
                        if (i > 0)
                            last = a[i - 1];
                        else
                            last = Integer.MIN_VALUE;
                        int next;
                        if (i + 1 < n)
                            next = a[i + 1];
                        else
                            next = Integer.MAX_VALUE;
                        for (int j = 0; j < k; j++)
                            if (last > b[j] || b[j] > next) {
                                out.println("Yes");
                                return;
                            }
                    }
                out.println("No");
            }
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author and_so_on
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int index = -1;
            int prev = -1, next = 250;
            if (k > 1) {
                out.println("Yes");
                return;
            } else {
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) {
                    arr[i] = in.nextInt();
                    if (arr[i] == 0) {
                        index = i;
                    }
                }
                int num = in.nextInt();
                if (index != 0) {
                    prev = arr[index - 1];
                }
                if (index != n - 1) {
                    next = arr[index + 1];
                }
                if (num <= prev || num >= next) {
                    out.println("Yes");
                } else {
                    out.println("No");
                }
            }
        }

    }
}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R418_Div2_A
{
	FastReader in;
	PrintWriter out;

	public static void main(String[] args)  {
		new R418_Div2_A().run();
	}

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		int n = in.nextInt();
		int k = in.nextInt();

		int[] a = new int[n];
		ArrayList<Integer> al1 = new ArrayList<>();
		ArrayList<Integer> al2 = new ArrayList<>();
		int z = 0, zInd = -1;
		for (int i = 0; i < n; i++)
		{
			a[i] = in.nextInt();
			if (a[i] == 0)
			{
				z++;
				zInd = i;
			}
			else
			{
				al1.add(i);
				al2.add(i);
			}
		}
		boolean yes = false;

		Collections.sort(al1);
		for (int i = 0; i < al1.size(); i++)
			if (al1.get(i) != al2.get(i))
				yes = true;

		int[] b = new int[n];
		for (int i = 0; i < k; i++)
			b[i] = in.nextInt();

		if (!yes && k > 1)
			yes = true;
		else
		{
			if ((zInd > 0 && a[zInd-1] > b[0])
			|| (zInd < n-1 && b[0] > a[zInd+1]))
				yes = true;
		}
		out.println(yes ? "Yes" : "No");
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.util.Scanner;

public class increasingSequence {

	public static void main(String[] args) {
		Scanner console = new Scanner(System.in);
		int a = console.nextInt();
		int b = console.nextInt();
		int[] A = new int[a];
		int[] B = new int[b];
		for (int i = 0; i < a; i++) {
			A[i] = console.nextInt();
		}
		for (int i = 0; i < b; i++) {
			B[i] = console.nextInt();
		}

		if (b > 1) {
			System.out.println("Yes");
		} else {
			for (int i = 0; i < a; i++) {
				if (A[i] == 0) {
					if (i != 0 && A[i - 1] > B[0]) {
						System.out.println("Yes");
					} else if (i < a - 1 && A[i + 1] < B[0]) {
						System.out.println("Yes");
					} else {
						System.out.println("No");
					}
				}
			}
		}

	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt(), m = scan.nextInt();
		int[] a = scan.nextIntArray(n);
		int[] b = scan.nextIntArray(m);
		if(m > 1){
			out.println("Yes");
			out.close();
			return;
		}
		boolean res = false;
		for(int i = 0; i < n; i++) if(a[i] == 0) if(i > 0 && a[i-1] > b[0] || i < n-1 && a[i+1] < b[0]) res = true;
		out.println(res?"Yes":"No");
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.StringTokenizer;

public class ProblemA {

	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		StringTokenizer st;

			line = br.readLine();
			st = new StringTokenizer(line);
			int n = Integer.parseInt(st.nextToken());
			int k = Integer.parseInt(st.nextToken());
			line = br.readLine();
			int[] a = new int[n];
			int[] b = new int[k];
			String result = "";
			if(k > 1)
				result = "Yes";
			else
			{
				for(int i = 0;i < a.length;i++)
				{
					if(a[i] == 0)
					{
						a[i] = b[0];
						break;
					}
				}

				if(isIncreasing(a))
					result = "No";
				else
					result = "Yes";
			}

			System.out.println(result);
		}

	public static boolean isIncreasing(int[] x)
	{
		boolean flag = true;

		for(int i = 0;i < x.length - 1;i++)
		{
			if(x[i+1] <= x[i])
				flag = false;
		}

		return flag;
	}
}

import java.util.*;

public class Solution{
       public static void main(String args[])
       {
              Scanner sc =new Scanner(System.in);
              int n = sc.nextInt();
              int arr_n[] = new int[n];
              int k = sc.nextInt();
              int arr_k[] = new int[k];
              int pos = 0;
              for(int i=0;i<n;i++)
              {
                    arr_n[i] = sc.nextInt();
                    if(arr_n[i]==0)
                            pos = i;
              }
              int count = 0;
              for(int i=0;i<k;i++)
              {
                      arr_k[i] = sc.nextInt();
                      if(arr_k[i]==0)
                      {
                             count++;
                      }
              }
              if(count>=2)
              {
                     System.out.print("Yes");
              }
              else
              {
                     // put that one element in arr_n ; arr_k[0] to be put
                     arr_n[pos]=arr_k[0];
                     // check increasing
                     int flag=0;
                     for(int i=1;i<arr_n.length;i++)
                     {
                            if(arr_n[i]<arr_n[i-1])
                            {
                                   flag=1; // non-increasing
                                   break;
                            }
                     }
                     if(flag==1)
                            System.out.print("Yes");
                     else
                            System.out.print("No");

              }

       }
}

import java.util.Scanner;
public class P814A
{
	public static void main(String[] args)
	{
	 Scanner scan=new Scanner(System.in);
	 int n,k,i,m,j;
	 int[] a=new int[100];
	 int[] b=new int[100];
	 boolean flag=false,flag1=false;
	 n=scan.nextInt();
	 k=scan.nextInt();
	 for(i=0;i<n;++i)
		{
		 a[i]=scan.nextInt();
		 if(a[i]>0)
			flag1=true;
		}
	 for(i=0;i<k;++i)
		b[i]=scan.nextInt();
	 if(n==k&&!flag1)
			System.out.println("Yes");
	 else if(!(n==k)&&!flag1)
			System.out.println("No");
	 else
		{
	 for(i=0;i<k;++i)
		for(j=0;j<k-1;++j)
			if(b[j]<b[j+1])
				{
				 b[j]=b[j]+b[j+1];
				 b[j+1]=b[j]-b[j+1];
				 b[j]=b[j]-b[j+1];
				}
	 for(j=0;j<n-1;++j)
		{
		 if(a[j]>0&&a[j+1]==0)
			{
			 for(m=0;m<k;++m)
				if(b[m]<=a[j]&&b[m]>0)
					{
					 flag=true;
					 break;
					}
			 if(!flag)
				{
				 for(m=0;m<k;++m)
					if(b[m]>0)
						{
						 a[j+1]=b[m];
						 b[m]=0;
						 break;
						}
				}
			}
		 if(a[j]>0&&j>0)
			{
			 if(a[j-1]==0)
				{
			 for(m=k-1;m>=0;--m)
				if(b[m]>=a[j]&&b[m]>0)
					{
					 flag=true;
					 break;
					}
			 if(!flag)
				{
				 for(m=k-1;m>=0;--m)
					if(b[m]>0)
						{
						 a[j-1]=b[m];
						 b[m]=0;
						 break;
						}
				}
				}
			}
		}
	 if(flag&&flag1)
		System.out.println("Yes ");
	 else
		System.out.println("No ");
	 }
	}
}

import java.util.*;
import static java.lang.Math.*;

public class Hello {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[] a = new int[n];
		int[] b = new int[k];
		int count = 0;
		String output = "YES";
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 0; i < k; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			if (a[i] == 0) {
				a[i] = b[count];
				count++;
			}
		}
		int tmp=0;
		for (int i = 0; i < n; i++) {
			if(i<(n-2)){
				if(a[i+1]>a[i])
					tmp++;
			}
		}
		if(tmp==(n-2)){
			if(a[n-1]>a[n-2])
				output="NO";
		}
		System.out.print(output);
	}

}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
				kid[k]=arr[p];
				int kt = arr[p];
				p=p+1;
				if(p == t1 && kt == 0){
					System.out.println("YES");
					b= true;
					break;
				}
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
}

import java.util.Arrays;
import java.util.Scanner;

public class Code {

public static void main(String[] args) {
	Scanner in=new Scanner(System.in);
	int n=in.nextInt();
	int zeros=in.nextInt();
	int a[]=new int[n];
	for(int i=0;i<n;i++){
		a[i]=in.nextInt();
	}
	int b[]=new int[zeros];
	for(int i=0;i<zeros;i++){
		b[i]=in.nextInt();
	}
	Arrays.sort(b);

	int l=0;
	int c=0;

		for(int i=0;i<n;i++)
		{
			if(a[i]==0){
				a[i]=b[c];
				c++;
			}

		}
		for(int i=0;i<n-1;i++)
		{
			if(a[i+1]>a[i]){
				l=1;
			}
			else
				l=0;

		}

	if(l==0)
		System.out.println("Yes");
	else
		System.out.println("No");

}

}

/*
ID: mchensd
LANG: JAVA
PROG: http://codeforces.com/problemset/problem/814/A
 */

/**
 *
 * @author Michael
 */

import java.util.*;
import java.io.*;

public class AbandonedSettlement {
    public void run(BufferedReader br, PrintWriter pw) throws IOException {
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if (k > 1) {
            pw.println("Yes");
            return;
        }

        st = new StringTokenizer(br.readLine());
        int[] seq = new int[n];
        for (int i=0; i<n; ++i) {
            seq[i] = Integer.parseInt(st.nextToken());
        }

        int t = Integer.parseInt(br.readLine());
        boolean ans = true;
        for (int i=0; i<n; ++i) {
            if (seq[i] == 0) {
                if (seq[i] != 0 && i > 0 && seq[i] < seq[i-1]) {
                    ans = true;
                    break;
                }
                if (i == 0) ans = seq[i+1] <= t;
                else if (i == n-1) ans = seq[i-1] >= t;
                else ans = seq[i+1] <= t || seq[i-1] >= t;
            }
        }
        if (ans) pw.println("Yes");
        else pw.println("No");

    }
    public static void main(String[] args) throws IOException {
//        new AbandonedSettlement().runFileIO("AbandonedSettlement");
        new AbandonedSettlement().runStdIO();

    }

    public void runFileIO(String filename) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(filename + ".in"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename + ".out")));
        run(br, pw);
        pw.close();
    }

    public void runStdIO() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        run(br, pw);
        pw.close();
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alexander Tsupko (alexander.tsupko@outlook.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt(), k = in.nextInt();
            int[] a = in.nextIntArray(n), b = in.nextIntArray(k), c = new int[n];
            int count = factorial(k), shift = --k;
            if (count == 1) {
                if (!isSorted(out, n, a, b, c)) return;
                out.println("No");
                return;
            }
            while (count-- > 0) {
                if (!isSorted(out, n, a, b, c)) return;
                shift = shift < 2 ? k : --shift;
                int temp = b[shift];
                b[shift] = b[shift - 1];
                b[shift - 1] = temp;
            }
            out.println("No");
        }

        private boolean isSorted(OutputWriter out, int n, int[] a, int[] b, int[] c) {
            for (int i = 0, j = 0; i < n; ++i) c[i] = a[i] != 0 ? a[i] : b[j++];
            for (int i = 1; i < n; ++i)
                if (c[i - 1] > c[i]) {
                    out.println("Yes");
                    return false;
                }
            return true;
        }

        private int factorial(int k) {
            return k > 0 ? k * factorial(k - 1) : 1;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buffer = new byte[1024];
        private int current;
        private int size;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (size == -1) throw new InputMismatchException();
            if (current >= size) {
                current = 0;
                try {
                    size = stream.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (size <= 0) return -1;
            }
            return buffer[current++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceCharacter(c)) c = read();
            int sign = 1;
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                result *= 10;
                result += c - '0';
                c = read();
            } while (!isSpaceCharacter(c));
            return result * sign;
        }

        private boolean isSpaceCharacter(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) array[i] = nextInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(String s) {
            writer.println(s);
        }

    }
}

import java.util.*;
import java.io.*;
public class Round418q1{
  static class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader(){
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    int nextInt(){
      return Integer.parseInt(next());
    }
    String next(){
      while(st==null || !st.hasMoreElements()){
        try{
          st = new StringTokenizer(br.readLine());
        }
        catch (IOException e){
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

  }

  static ArrayList<Integer> kList;
  static int greatestLesThanNum;
  public static void main(String[] args) throws IOException{
    FastReader fr = new FastReader();
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    int  n = fr.nextInt();
    int k = fr.nextInt();
    ArrayList<Integer> list = new ArrayList<>();
    kList = new ArrayList<>();
    for(int i=0;i<n;i++){
      list.add(fr.nextInt());
    }
    for(int i=0;i<k;i++){
      kList.add(fr.nextInt());
    }
    Collections.sort(kList);
    for(int i=0;i<n;i++){
      if(list.get(i)==0){
        if(i==0){
          list.set(0, kList.get(kList.size()-1));
        }
        else{
          greatestLesThanNum = -1;
          int num = searchLessThan(list.get(i-1),0,kList.size()-1);
          if(num==-1){
            num = kList.get(kList.size()-1);
            kList.remove(kList.size()-1);
          }
          list.set(i,num);
        }
      }
    }
    String ans = "No";
    for(int i=1;i<n;i++){
      //System.out.println(list.get(i)+" "+ list.get(i-1));

      if(list.get(i)< list.get(i-1)){
        ans = "Yes";
      }
    }
    out.write(ans+"\n");
    out.flush();
  }

  static int searchLessThan(int n, int start, int end){
    if(start>end){
      return -1;
    }
    int mid = (start+end)/2;

    if(kList.get(mid)>=n && (mid+1>end || kList.get(mid+1)<n)){
      int temp = kList.get(mid);
      kList.remove(mid);
      return temp;
    }
    if(kList.get(mid)<=n){
      return searchLessThan(n, mid+1, end);
    }
    if(kList.get(mid)>n)
      return searchLessThan(n, start, mid-1);
    return -1;
  }
}

/*
ID: mchensd
LANG: JAVA
PROG: http://codeforces.com/problemset/problem/814/A
 */

/**
 *
 * @author Michael
 */

import java.util.*;
import java.io.*;

public class AbandonedSettlement {
    public void run(BufferedReader br, PrintWriter pw) throws IOException {
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if (k > 1) {
            pw.println("Yes");
            return;
        }

        st = new StringTokenizer(br.readLine());
        int[] seq = new int[n];
        for (int i=0; i<n; ++i) {
            seq[i] = Integer.parseInt(st.nextToken());
        }

        int t = Integer.parseInt(br.readLine());
        boolean ans = true;
        for (int i=0; i<n; ++i) {
            if (seq[i] == 0) {
                if (i == 0) ans = seq[i+1] <= t;
                else if (i == n-1) ans = seq[i-1] >= t;
                else ans = seq[i+1] <= t || seq[i-1] >= t;
            }
        }
        if (ans) pw.println("Yes");
        else pw.println("No");

    }
    public static void main(String[] args) throws IOException {
//        new AbandonedSettlement().runFileIO("AbandonedSettlement");
        new AbandonedSettlement().runStdIO();

    }

    public void runFileIO(String filename) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(filename + ".in"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename + ".out")));
        run(br, pw);
        pw.close();
    }

    public void runStdIO() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        run(br, pw);
        pw.close();
    }
}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;
		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);
		if(kid[0]>=kid[kid.length-1]){
				System.out.println("YES");
			}
		else{
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else{
				if(p<t1){
				kid[k]=arr[p];
				p=p+1;
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
				kid[k]=arr[p];
				p=p+1;
				}
				else if(p == t1){
					System.out.println("YES");
					b= true;
					break;
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
	}

import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
import java.io.*;

public class Main {
    public void solve() throws IOException {
        int n = nextInt();
        int m = nextInt();
        int[] a = new int[n];
        int[] b = new int[m];
        for (int i = 0; i < n; i++) {
            a[i] = nextInt();
        }
        for (int i = 0; i < m; i++) {
            b[i] = nextInt();
        }
        int t = 0;
        int x = 0;
        for (int i = 0; i < n; i++) {
            if (a[i] == 0) {
                t++;
            }
            if (i != 0 && a[i] * a[i - 1] != 0) {
                if (a[i - 1] >= a[i]) {
                    x = 1;
                }
            }
        }
        if (x == 1 || t > 1) {
            out.print("YES");
        } else {
            if (t == 0) {
                if (x == 1) {
                    out.print("YES");
                } else {
                    out.print("NO");
                }
            } else {
                if (t == 1) {
                    for (int i = 0; i < n; i++) {
                        if (a[i] == 0){
                            boolean r = true;
                            for(int j = 0; j < m; j++){
                                if(i != 0 && a[i - 1] > b[j] || i != n - 1 && a[i + 1] <= b[j]){
                                    r = false;
                                    break;
                                }
                            }
                            if(r){
                                out.print("YES");
                            }else {
                                out.print("NO");
                            }
                        }
                    }
                }
            }
        }
    }

    BufferedReader br;
    StringTokenizer sc;
    PrintWriter out;

    public String nextToken() throws IOException {
        while (sc == null || !sc.hasMoreTokens()) {
            try {
                sc = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                return null;
            }
        }
        return sc.nextToken();
    }

    public Integer nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public static void main(String[] args) throws IOException {
        try {
            Locale.setDefault(Locale.US);
        } catch (Exception e) {
        }
        new Main().run();
    }

    public void run() {
        try {
            br = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
//            br = new BufferedReader(new FileReader("lesson.in"));
//            out = new PrintWriter(new File("lesson.out"));
            solve();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}

import java.util.*;
import java.io.*;
import java.lang.*;
public class A814 {
	private static long mod = 1000000007;

	public static void main(String[] args) {
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int n=in.nextInt();
		int k=in.nextInt();

		int[] a =in.nextIntArray(n);
		int[] b=in.nextIntArray(k);
		Arrays.sort(b);
		int j=0;
		for(int i=0;i<n;i++) {
			if(a[i]==0)
			{	a[i]=b[j];
				j++;
			}

		}

		boolean flag=false;
		for(int i=0;i<n-1;i++) {
			if(a[i+1]<a[i])
			{	flag=true;
				break;
			}
		}
		if(flag==true)
			pw.println("YES");
		else
			pw.println("NO");

		pw.flush();
		pw.close();
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}
}

import java.io.*;
    import java.math.BigInteger;
import java.text.DecimalFormat;
import java.util.*;

    public  class Main {
    	public static InputReader in;
        public static PrintWriter pw;

    	public static void main(String args[])
    	{
    		new Thread(null, new Runnable() {
                public void run() {
                    try{
                        solve();
                    }
                    catch(Exception e){
                        e.printStackTrace();
                    }
                }
            }, "1", 1 << 26).start();
        }
    	static ArrayList<Integer> g[];
    	static ArrayList<Integer> h[];
    	static boolean visited[];
    	static int[] parent;
    	static int par[];
    	static int degree[];
    	static int edjes=0;
    	static int start=-1;
    	static int end=-1;
    	static int Total=0;
    	static int time1[];
    	static int time2[];
    	static int glob=0;
    	static int[] ans;
    	static boolean vis2[][];
    	//static long sum1=0;
    	//static long val[];
        static ArrayList<Integer> levels[];
        static int max=0;
        static int lev=1;
        static ArrayList<Integer> nodes[];
        static ArrayList<Integer> values[];
        static int depth[];
        static boolean found=false;
       // static long sm[];
        static int sum1=0;
        static int pre[][];
        static int subtree[];
       static  int cnt=0;
       static  HashMap<String,Integer> hm;
       static int sm[];
       static int size[];
       static long mul[];
       static long d[]=new long[1000000];
       static int tot=0;
       static long highest=(long)1e9;
       static boolean bit=false;
        static Stack<Integer> tt=new Stack();
       static HashSet<Character> set;
 	   static long fact[],num[];
 	   static long MOD=1000000007;
 	   static int value[];static int premen[];
 	   static int count=0,index=0;
 	   static double ans11[];
 	   static int price[];
 	   static ArrayList<String> hp[][];
 	   static boolean visit[][];
 	   static int cnu[]=new int[1000001];
 	   static int label=1;
 	   static int his[][];
 	   static int size1=0;
 	   static int up[],down[];
 	   static int TotalUp=0;
 	   static long dist[];
 	//   static HashMap<String,Integer> hm1=new HashMap();
 	  // static HashMap<Integer,Integer> hm2=new HashMap();
 	   static TreeSet<Long> set1=new TreeSet();
 	  static  long DP[][][]=new long[20][200][1500];
 	 	static int t=-1,n=-1;
 	 	static int two[],min[],r[];
 	 	static int total[];static int black[];
 	 	static int Parent[];
 	 	static int max2[];
 	 	static int tin[],tout[],a[];
 	 public static void solve() throws FileNotFoundException{

    		 in = new InputReader(System.in);
    		 pw = new PrintWriter(System.out);
    	/*	 String p=in.readString();
    	     char c[]=p.toCharArray();
    	     int z[]=new int[p.length()];
    	     z[0]=0;
    	     int left=0;
    	     int right=0;
    	     for(int i=1;i<p.length();i++)
    	     {
    	    	 if(i>right)
    	    	 {

    	    		 left=right=i;
    	    		 while(right<p.length()&&c[right]==c[right-left])
    	    			 right++;
    	    		 z[i]=right-left;
    	    		 right--;
    	    	 }
    	    	 else
    	    	 {
    	    		 int k=i-left;
    	    		 if(z[k]<right-i+1)
    	    		 {
    	    			 z[i]=z[k];
    	    		 }
    	    		 else
    	    		 {
    	    			 left=i;
    	    			 while(right<p.length()&&c[right]==c[right-left])
        	    			 right++;
        	    		 z[i]=right-left;
        	    		 right--;
    	    		 }
    	    	 }

    	     }*/
    		 int n=in.nextInt();
    		 int k=in.nextInt();
    		 int a[]=in.nextIntArray(n);
    		 int b[]=in.nextIntArray(k);
    		 TreeSet<Integer> set=new TreeSet();
    		 for(int i=0;i<k;i++)
    			 set.add(b[i]);
    		 int c=0;
    		 for(int i=0;i<n;i++)
    		 {
    			 if(a[i]==0)
    			 {
    				 int cp=0;
    				 for(int j=0;j<n;j++)
    				 {
    					 if(a[j]==0)
    						 cp++;
    				 }
    				 if(cp>1)
    				 {
    					 System.out.println("Yes");
    					 return;
    				 }
    			 }
    		 }
    		 for(int i=0;i<n;i++)
    		 {
    			 if(a[i]==0)
    			 {
    				c++;
    			 }
    			 if(i+1<n&&a[i]!=0&&a[i+1]==0)
    			 {
    				 if(set.lower(a[i])!=null)
    				 {
    					 System.out.println("Yes");
    					 return;
    				 }
    			 }
    			 if(i>=1&&a[i]!=0&&a[i-1]==0)
    			 {
    				 if(set.higher(a[i])!=null)
    				 {
    					 System.out.println("Yes");
    					 return;
    				 }
    			 }
    		 }
    		 if(c==n)
    		 {
    			 System.out.println("Yes");
    			 return;
    		 }
    		 System.out.println("No");
    		}

 	 public static void bfs(int x)
 	 {
 		 visited[x]=true;
 		 Queue<Integer> Q=new LinkedList<Integer>();
 		 Q.add(x);
 		 while(!Q.isEmpty())
 		 {
 			 int count=Q.size();
 			 while(count>0)
 			 {
 				 int p=Q.poll();
 				 visited[p]=true;
 				 for(int y:g[p])
 				 {
 					 if(!visited[y])
 					 {
 						 Q.add(y);
 					 }
 				 }
 				 count--;
 			 }
 		 }
 	 }
 	 public static void depth(int curr,int parent)
 	 {
 		 visited[curr]=true;
 		 for(int x:g[curr])
 		 {
 			 if(!visited[x])
 			 {
 				 depth[x]=depth[curr]+1;
 				 depth(x,curr);
 			 }
 		 }
 	 }

 	 static int Par[]=new int[202];
 	 public static void Height(int cur,int par){
 		 Par[cur]=par;
 		 visited[cur]=true;
 		 int t=0;
 		 for(int x:g[cur])
 		 {
 			 if(!visited[x])
 			 {
 				 t++;
 				 Height(x,cur);
 				 high[cur]=Math.max(high[cur], high[x]+1);
 			 }
 		 }
 		 if(t==0)
 		 {
 			 high[cur]=0;
 		 }

 	 }
 	 static int dia[]=new int[202];
 	 static int high[]=new int[292];
 	 public static void Diameter(int curr,int parent)
 	 {
 		visited[curr]=true;
 		int trees=0;
 		ArrayList<Integer> set=new ArrayList();

 		for(int x:g[curr])
 		{
 			if(!visited[x])
 			{
 				trees++;
 				Diameter(x,curr);
 				dia[curr]=Math.max(dia[curr],high[x]);
 				set.add(high[x]);
 			}
 		}
 		if(set.size()>=2)
 		{
 			Collections.sort(set,Collections.reverseOrder());
 			dia[curr]=Math.max(dia[curr],set.get(0)+set.get(1)+2);
 		}
 		else if(set.size()>0)
 		{
 			dia[curr]=Math.max(dia[curr],set.get(0)+1);
 		}
 		if(trees==0)
 		{
 			dia[curr]=0;
 		}

 	 }

 	 public static boolean IsPal(String s)
 	 {
 		 char c[]=s.toCharArray();
 		 for(int i=0;i<c.length/2;i++)
 		 {
 			 if(c[i]!=c[s.length()-1-i])
 				 return false;
 		 }
 		 return true;
 	 }
 	public static void Merge(long[] a,int p,int r){
        if(p<r){
            int q = (p+r)/2;
            Merge(a,p,q);
            Merge(a,q+1,r);
            Merge_Array(a,p,q,r);
        }
    }
    public static void Merge_Array(long a[],int p,int q,int r){
       long b[] = new long[q-p+1];
        long c[] = new long[r-q];
        for(int i=0;i<b.length;i++)
            b[i] = a[p+i];
        for(int i=0;i<c.length;i++)
            c[i] = a[q+i+1];
        int i = 0,j = 0;
        for(int k=p;k<=r;k++){
            if(i==b.length){
                a[k] = c[j];
                j++;
            }
            else if(j==c.length){
                a[k] = b[i];
                i++;
            }
            else if(b[i]<c[j]){
                a[k] = b[i];
                i++;
            }
            else{
                a[k] = c[j];
                j++;
            }
        }
    }

 	  public static void dfs1(int curr,int parent)
 	  {
 		  visited[curr]=true;

 		  for(int x:g[curr])
 		  {

 			  if(x==parent)continue;
 			  depth[x]=depth[curr]+1;
 			  up[x]=up[curr];
 			  if(h[x].contains(curr)){
 				  up[x]++;
 				  TotalUp++;
 			  }
 			  dfs1(x,curr);
 		  }
 	  }

        public static void dfs(int curr,int Parent)
        {
        	visited[curr]=true;
        	size[curr]=1;
        	parent[curr]=Parent;
        	count++;
        	if(value[curr]>0)
        	{
        		index=value[curr];
        	}
        	for(int x:g[curr])
        	{
        		if(!visited[x])
        		{
        			dfs(x,curr);
        			size[curr]+=size[x];
        		}
        	}
        }
        static long ncr(long a, long b){
			if(b>a || b<0) return 0;
			long f = (fact[(int) a]*modInverse(((fact[(int) b]*fact[(int) (a-b)])%MOD), MOD))%MOD;
			return f;
		}
		static long modInverse(long a, long mOD2){
            return  power(a, mOD2-2, mOD2);
}
static long power(long x, long y, long m)
{
    if (y == 0)
        return 1;
    long p = power(x, y/2, m) % m;
    p = (p * p) % m;

    return (y%2 == 0)? p : (x * p) % m;
}

        public static long gcd(long x, long y) {
    		if (x == 0)
    			return y;
    		else
    			return gcd( y % x,x);
    	}
        public static long power(long a,long b)
		{
			long result=1;
			while(b>0)
			{
				if(b%2==1)
					result*=a;
				a=a*a;
				b/=2;
			}
			return result;
		}
        static class Pair implements Comparable<Pair>{
        	    long val;int index;
        		Pair(long val,int index){
        	     	this.val=val;
        			this.index=index;
        		}
        		@Override
        		public int compareTo(Pair o) {
                          if(o.val!=val)
                        	  return (int) (o.val-val);
                          else
                        	  return index-o.index;
        		}

        	}
    	static class InputReader {

    		private InputStream stream;
    		private byte[] buf = new byte[8192];
    		private int curChar, snumChars;
    		private SpaceCharFilter filter;

    		public InputReader(InputStream stream) {
    			this.stream = stream;
    		}

    		public int snext() {
    			if (snumChars == -1)
    				throw new InputMismatchException();
    			if (curChar >= snumChars) {
    				curChar = 0;
    				try {
    					snumChars = stream.read(buf);
    				} catch (IOException e) {
    					throw new InputMismatchException();
    				}
    				if (snumChars <= 0)
    					return -1;
    			}
    			return buf[curChar++];
    		}

    		public   int nextInt() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			int sgn = 1;
    			if (c == '-') {
    				sgn = -1;
    				c = snext();
    			}
    			int res = 0;
    			do {
    				if (c < '0' || c > '9')
    					throw new InputMismatchException();
    				res *= 10;
    				res += c - '0';
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res * sgn;
    		}

    		public long nextLong() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			int sgn = 1;
    			if (c == '-') {
    				sgn = -1;
    				c = snext();
    			}
    			long res = 0;
    			do {
    				if (c < '0' || c > '9')
    					throw new InputMismatchException();
    				res *= 10;
    				res += c - '0';
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res * sgn;
    		}

    		public int[] nextIntArray(int n) {
    			int a[] = new int[n];
    			for (int i = 0; i < n; i++)
    				a[i] = nextInt();
    			return a;
    		}

    		public String readString() {
    			int c = snext();
    			while (isSpaceChar(c))
    				c = snext();
    			StringBuilder res = new StringBuilder();
    			do {
    				res.appendCodePoint(c);
    				c = snext();
    			} while (!isSpaceChar(c));
    			return res.toString();
    		}

    		public boolean isSpaceChar(int c) {
    			if (filter != null)
    				return filter.isSpaceChar(c);
    			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    		}

    		public interface SpaceCharFilter {
    			public boolean isSpaceChar(int ch);
    		}
    	}
    }

import java.util.*;
import java.io.*;

public class sol{
  static int[] A;
  static List<Integer> B;
  public static void main(String[] args){
    FastIO io = new FastIO();
    int n = io.nextInt();
    int k = io.nextInt();
    boolean temp = false;
    A = new int[n];
    B = new ArrayList<Integer>();
    for(int i = 0; i < n; i++){
      A[i] = io.nextInt();
      /*
      if(i != 0 && A[i] > A[i-1] && A[i] != 0 && A[i-1] != 0){
        temp = true;
      }
      */
    }
    for(int i = 0; i < k; i++){
      B.add(io.nextInt());
    }
    //if(temp) io.println("Yes");
    //else{
     Collections.sort(B);
     io.println(isPossible() ? "Yes" : "No");
    //}
  }
  public static boolean isPossible(){
    for(int i = 0; i < A.length; i++){
      if(A[i] != 0) continue;
      if(B.size() == 0) return false;
      if(B.get(B.size() - 1) == 0) return false;
      if(i == 0){
        A[i] = B.get(B.size() - 1); B.remove(B.size() - 1);
        continue;
      }
      for(Integer item : B){
        if(item == 0) continue;
        if(item < A[i-1]){
          return true;
        }
      }
    }
    return false;
  }
}
class FastIO{
  BufferedReader br;
  StringTokenizer st;
  public FastIO(){
    br = new BufferedReader(new InputStreamReader(System.in));
  }
  void println(Object o){
    System.out.println(o);
  }
  void print(Object o){
    System.out.print(o);
  }
  char nextChar(){
    char x = next().charAt(0);
    return x;
  }
  String next(){
    while(st == null || !st.hasMoreElements()){
      try{
        st = new StringTokenizer(br.readLine());
      } catch(IOException e){
        e.printStackTrace();
      }
    }
    return st.nextToken();
  }
  int nextInt(){
    return Integer.parseInt(next());
  }
  long nextLong(){
    return Long.parseLong(next());
  }
  double nextDouble(){
    return Double.parseDouble(next());
  }
  String nextLine(){
    String str = "";
    try{
      str = br.readLine();
    } catch(IOException e){
      e.printStackTrace();
    }
    return str;
  }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class abandoned {
    static void comparetwo(int[] arr,int[] mix,int k,int jusval){
        if(k>1){
            System.out.println("Yes");
            return;
        }
        else{
            int high;
            int low;
            if(jusval>0 && arr[arr.length-1]!=0){
                low = jusval-1;
                high = jusval+1;
                if(arr[low]<mix[0] && mix[0]<arr[high]){
                    arr[jusval] = mix[0];
                    int kval=0;

                    for(int i=0;i<arr.length-1;i++){
                        if(arr[i]>=arr[i+1]){
                            kval++;
                            break;
                        }
                    }
                    if(kval==0){
                        System.out.println("No");
                        return;
                    }
                    else{
                        System.out.println("Yes");
                        return;
                    }

                }
            }
            else if (arr[arr.length-1]==0){
                low = jusval-1;
                if(arr[low]<mix[0]){
                    System.out.println("No");
                    return;
                }
                else {
                    System.out.println("Yes");
                    return;
                }
            }
            else{
                high = jusval+1;
                if(arr[high]<mix[0]){
                    System.out.println("Yes");
                    return;
                }
                else{
                    System.out.println("No");
                    return;
                }

            }

        }
        return;

    }
    public static void main(String[] args){
        int n,k;
        FastReader fastReader=new FastReader();
        n=fastReader.nextInt();
        k= fastReader.nextInt();
        int[] test = new int[n];
        int[] mix = new int[k];
        int count=0;
        for (int i=0;i<n;i++){
            test[i] = fastReader.nextInt();
            if(test[i]==0){
                count=i;
            }
        }
        for (int i=0;i<k;i++){
            mix[i] = fastReader.nextInt();
        }
        comparetwo(test,mix,k,count);

    }
}
class FastReader {
    public static BufferedReader br;
    public static StringTokenizer st;
    public FastReader(){
        br = new BufferedReader(new InputStreamReader(System.in));
    }
    static String next() {
        while(st==null || !st.hasMoreElements()) try {
            st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
        return st.nextToken();
    }
    public static int nextInt(){
        return  Integer.parseInt(next());
    }
}

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            if (a[n - 1] > 0) {
                for (int i = 0; i < n - 1; i++) {
                    if (a[i] == 0) {
                        a[i] = b[0];
                        if (a[i + 1] < a[i]) return true;
                    }
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        System.out.println(check);
        if (k > 1 ||
                check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.util.*;
import java.io.*;
import java.lang.*;
public class A814 {
	private static long mod = 1000000007;

	public static void main(String[] args) {
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);

		int n=in.nextInt();
		int k=in.nextInt();

		int[] a =in.nextIntArray(n);
		int[] b=in.nextIntArray(k);

		Arrays.sort(b);
		int j=0;
		for(int i=0;i<n-1;i++) {
			if(a[i]==0)
			{	a[i]=b[j];
				j++;
			}

		}

		boolean flag=false;
		for(int i=0;i<n-1;i++) {

			if(a[i+1]>a[i])
			{	flag=true;
				break;

			}
			else {
				flag=false;

			}
		}

		if(flag==true)
			pw.println("YES");
		else
			pw.println("NO");

		pw.flush();
		pw.close();
	}

	static class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

	public static int[] suffle(int[] a,Random gen)
	{
		int n = a.length;
		for(int i=0;i<n;i++)
		{
			int ind = gen.nextInt(n-i)+i;
			int temp = a[ind];
			a[ind] = a[i];
			a[i] = temp;
		}
		return a;
	}

	public static void swap(int a, int b){
		int temp = a;
		a = b;
		b = temp;
	}

	public static ArrayList<Integer> primeFactorization(int n)
	{
		ArrayList<Integer> a =new ArrayList<Integer>();
		for(int i=2;i*i<=n;i++)
		{
			while(n%i==0)
			{
				a.add(i);
				n/=i;
			}
		}
		if(n!=1)
			a.add(n);
		return a;
	}

	public static void sieve(boolean[] isPrime,int n)
	{
		for(int i=1;i<n;i++)
			isPrime[i] = true;

		isPrime[0] = false;
		isPrime[1] = false;

		for(int i=2;i*i<n;i++)
		{
			if(isPrime[i] == true)
			{
				for(int j=(2*i);j<n;j+=i)
					isPrime[j] = false;
			}
		}
	}

	public static int GCD(int a,int b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long GCD(long a,long b)
	{
		if(b==0)
			return a;
		else
			return GCD(b,a%b);
	}

	public static long LCM(long a,long b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int LCM(int a,int b)
	{
		return (a*b)/GCD(a,b);
	}

	public static int binaryExponentiation(int x,int n)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static long binaryExponentiation(long x,long n)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=result * x;
	        x=x*x;
	        n=n/2;
	    }
	    return result;
	}

	public static int modularExponentiation(int x,int n,int M)
	{
	    int result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static long modularExponentiation(long x,long n,long M)
	{
	    long result=1;
	    while(n>0)
	    {
	        if(n % 2 ==1)
	            result=(result * x)%M;
	        x=(x*x)%M;
	        n=n/2;
	    }
	    return result;
	}

	public static int modInverse(int A,int M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static long modInverse(long A,long M)
	{
	    return modularExponentiation(A,M-2,M);
	}

	public static boolean isPrime(int n)
	{

	    if (n <= 1)  return false;
	    if (n <= 3)  return true;

	    if (n%2 == 0 || n%3 == 0)
	    	return false;

	    for (int i=5; i*i<=n; i=i+6)
	    {
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	    }

	    return true;
	}

	static class pair implements Comparable<pair>
	{
		Integer x, y;
		pair(int x,int y)
		{
			this.x=x;
			this.y=y;
		}

		public int compareTo(pair o) {
			int result = x.compareTo(o.x);
			if(result==0)
				result = y.compareTo(o.y);

			return result;
		}
	}
}

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            if (a[n - 1] > 0) {
                for (int i = 0; i < n - 1; i++) {
                    if (a[i] == 0) {
                        a[i] = b[0];
                        if (a[i + 1] < a[i]) return true;
                    }
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        if (k > 1 ||
                check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.util.*;
import static java.lang.Math.*;

public class Hello {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		int[] a = new int[n];
		int[] b = new int[k];
		int count = 0;
		String output = "YES";
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 0; i < k; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < n; i++) {
			if (a[i] == 0) {
				a[i] = b[count];
				count++;
			}
		}
		int tmp=0;
		for (int i = 0; i < n; i++) {
			if(i<(n-2)){
				if(a[i+1]>a[i])
					tmp++;
			}
		}
		if(tmp==(n-2)){
			if(a[n-1]>a[n-2])
				output="NO";
		}
		System.out.print(output);
	}

}

import java.io.*;
import java.util.*;

public class A1008 {
    public static void main(String [] args) /*throws Exception*/ {
        InputStream inputReader = System.in;
        OutputStream outputReader = System.out;
        InputReader in = new InputReader(inputReader);//new InputReader(new FileInputStream(new File("input.txt")));new InputReader(inputReader);
        PrintWriter out = new PrintWriter(outputReader);//new PrintWriter(new FileOutputStream(new File("output.txt")));
        Algorithm solver = new Algorithm();
        solver.solve(in, out);
        out.close();
    }
}

class Algorithm {
    void solve(InputReader ir, PrintWriter pw) {

        int n = ir.nextInt(), k = ir.nextInt();
        int [] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ir.nextInt();

        int [] b = new int[k];
        for (int i = 0; i < k; i++) b[i] = ir.nextInt();

        if (k >= 2) {
            pw.print("Yes");
            return;
        }
        else {
            for (int i = 0; i < n; i++) {
                if (a[i] == 0) {
                    for (int j = 0; j < k; j++) {
                        if (b[j] < a[i - 1] || b[j] > a[i + 1]) {
                            pw.print("Yes");
                            return;
                        }
                    }
                }
            }
        }

        pw.print("No");

    }

    private static void Qsort(int[] array, int low, int high) {

        int i = low;
        int j = high;
        int x = array[low + (high - low) / 2];

        do {
            while (array[i] < x) ++i;
            while (array[j] > x) --j;
            if (i <= j) {
                int tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
                i++;
                j--;
            }
        } while (i <= j);

        if (low < j) Qsort(array, low, j);
        if (i < high) Qsort(array, i, high);

    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream), 32768);
        tokenizer = null;
    }

    String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    String nextLine(){
        String fullLine = null;
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                fullLine = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return fullLine;
        }
        return fullLine;
    }

    String [] toArray() {
        return nextLine().split(" ");
    }

    int nextInt() {
        return Integer.parseInt(next());
    }
    double nextDouble() {
        return Double.parseDouble(next());
    }
    long nextLong() {
        return Long.parseLong(next());
    }

}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class _418 {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		int aSize, bSize;
		aSize = input.nextInt();
		bSize = input.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>(aSize);
		ArrayList<Integer> b = new ArrayList<Integer>(bSize);

		for(int i = 0 ; i < aSize ; i++)
			a.add(input.nextInt());

		for(int i = 0; i < bSize ; i++)
			b.add(input.nextInt());

		Collections.sort(b, Collections.reverseOrder());

		boolean isValid = false;

		for(int i = 0; i < aSize ; i++){

			if(a.get(i) == 0){

				for(int j = 0 ; j < bSize ; j++){

					if(i != 0){
						if(b.get(j) < a.get(i-1)){
							isValid = true;
							break;
						}
					}
					if(i != (aSize - 1)){
						if(b.get(j) > a.get(i+1)){
							isValid = true;
							break;
						}
					}
				}
			}

			if(isValid) break;
		}

		if(isValid)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

}

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;

public class Main {

    public static void main(String[] args) {
        FastReader in = new FastReader();
        int n = in.nextInt();
        int k = in.nextInt();
        int [] a  = new int[n];
        int [] b = new int[k];
        for(int i =0;i<a.length;i++){
            a[i] = in.nextInt();
        }
      for(int i= 0;i<b.length;i++){
          b[i] = in.nextInt();
      }
       boolean flag =  false;
       if(b.length==1){
           for (int i = 0; i < a.length; i++) {
               if(a[i]==0){
                  int u = i;
                   for (int j = 0; j < u; j++) {
                       if(b[0]<=a[u]){
                           flag = true;
                       }
                   }
               }
           }
       }
        if(a.length!=1){
            for(int i =0;i<a.length;i++){
                if((a[i]==0&&i>0)||(a[i]==0&&i==a.length-1)){
                    for(int j =0;j<b.length;j++){
                        if(i<a.length-1){
                        if(b[j]<=a[i-1]||b[j]>=a[i+1]){
                            a[i] = b[j];
                            flag= true;
                        }}else  if(i==a.length-1){
                            if(a[i]<b[j]){
                                flag = true;
                            }
                        }
                    }
                }else if(a[i]==0&&i==0){
                    for(int h = b.length-1;h>=0;h--){
                        a[i] = b[h];
                    }
                    for(int o =0;o<a.length;o++){
                        for(int t = o+1;t<a.length;t++){
                            if(a[t]<a[o]){
                                flag = true;
                            }
                    }
                }
                    break;
            }
            }
            if(flag){
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }

    }

    }
}

class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        String YES = "Yes";
        String NO = "No";

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int k = in.readInt();
            int[] a = IOUtils.readIntArray(in, n);
            int[] bb = IOUtils.readIntArray(in, k);
            int aZeros = ArrayUtils.count(a, 0);
            if (aZeros != 1) {
                out.printLine(YES);
                return;
            }
            int aZeroIndex = ArrayUtils.find(a, 0);
            int before = ((aZeroIndex == 0) ? -1 : a[aZeroIndex - 1]);
            int after = ((aZeroIndex == n - 1) ? 10000000 : a[aZeroIndex + 1]);
            for (int b : bb) {
                if (b == before || b == after) throw new RuntimeException();
                if (b < before && b > after) {
                    out.printLine(YES);
                    return;
                }
            }
            out.printLine(NO);
        }
    }
    static class ArrayUtils {
        public static int count(int[] array, int value) {
            return new IntArray(array).count(value);
        }

        public static int find(int[] array, int value) {
            return new IntArray(array).find(value);
        }
    }
    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
    static interface IntIterator {
        public int value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);
        public abstract void removeAt(int index);
        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
        default public int find(int value) {
            int size = size();
            for (int i = 0; i < size; i++) {
                if (get(i) == value) {
                    return i;
                }
            }
            return -1;
        }
    }
    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();
        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
        default public int count(int value) {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (it.value() == value) {
                    result++;
                }
            }
            return result;
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }
    }
    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = in.readInt();
            }
            return array;
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static interface IntCollection extends IntStream {
        public int size();
    }
    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }
    }
    static interface IntReversableCollection extends IntCollection {
    }
}

import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public  class FibinacciSeries
{

	   static class FastReader
	    {
	        BufferedReader br;
	        StringTokenizer st;

	        public FastReader()
	        {
	            br = new BufferedReader(new
	                     InputStreamReader(System.in));
	        }

	        String next()
	        {
	            while (st == null || !st.hasMoreTokens())
	            {
	                try
	                {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException  e)
	                {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();

	        }

	        int nextInt()
	        {
	            return Integer.parseInt(next());
	        }

	        long nextLong()
	        {
	            return Long.parseLong(next());
	        }

	        double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }

	        String nextLine()
	        {
	            String str = "";
	            try
	            {
	                str = br.readLine();
	            }
	            catch (IOException e)
	            {
	                e.printStackTrace();
	            }
	            return str;
	        }

			public Character charAt(int i) {
				// TODO Auto-generated method stub
				return null;
			}
	    }

	  // Complete the hurdleRace function below.
//    public static void solve() {
//    	FastReader s=new FastReader();

    public static void main(String[] args) throws IOException {
    	FastReader s=new FastReader();

    	int na = s.nextInt();
    	int nb = s.nextInt();
    	int[] a =  new int[na];
    	int[] b = new int[nb];
    	int pos = 0,flag=0,p=0;
    	for(int i=0;i<na ;i++) {
    		a[i] = s.nextInt();

    	}
    	for(int i=0;i<na;i++) {
    		if(i!=0 && a[i]!=0 && a[i]<a[i-1])p=1;
    		if(a[i]==0) {
    			pos=i;

    		}
    	}
    	int max=0;
    	for(int i=0;i<nb;i++) {
    		b[i] = s.nextInt();

       	}
    	if(nb>1)System.out.println("YES");
    	else {
    		a[pos]=b[0];
    		for(int i=1;i<nb && flag==0;i++) {
    			if(a[i]>=a[i-1]) {
    				flag=1;
    				break;
    			}
    		}
    		if(flag==1)System.out.println("NO");
    		else System.out.println("YES");
    	}

    }
}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0&& kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		if(kid[0]>=kid[kid.length-1] && kid[t-1]!= 0){
				System.out.println("YES");
				b = true;
			}
		else{
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else{
				if(p<t1){
				kid[k]=arr[p];
				p=p+1;
				}
				if(p == t1){
					System.out.println("YES");
					b= true;
					break;
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
	}
}

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            for (int i = 0; i < n - 1; i++) {
                if (a[i] == 0) {
                    a[i] = b[0];
                }
            }
            for (int i = 0; i < n - 1; i++) {
                if (a[i + 1] < a[i]) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        if (k > 1 || check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
				kid[k]=arr[p];
				p=p+1;
				if(p == t1 && kid[p-1] == 0){
					System.out.println("YES");
					b= true;
					break;
				}
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
}

import java.util.*;
import java.io.*;

    public class Sample implements Runnable{
    static ArrayList<Integer>[] al;
         static class Pair implements Comparator<Pair>{
  int a;
  int b;
  Pair(){

  }
  Pair(int a,int b){
    this.a=a;
    this.b=b;
  }
  public int compare(Pair p1,Pair p2){

    return p2.b-p1.b;
 }
}
  static class Beauty implements Comparator<Beauty>{
    int beauty;
    int cost;
    Beauty(){
        }
    Beauty(int beauty,int cost){
      this.beauty=beauty;
      this.cost=cost;

    }
    public int compare(Beauty b1,Beauty b2 ){
      if(b2.beauty-b1.beauty==0){
        return b1.cost-b2.cost;
      }else{
        return b2.beauty-b1.beauty;
      }
    }

  }

   static InputReader sc = new InputReader();
   static int gcd(int a,int b){
    if(a==0){
      return b;
    }
    return gcd(b%a,a);
   }
   static int d;
   static int[] color;
   static boolean[] v;
  /*  static void dfs(int src,int x,int y){
      v[src]=true;
     int  i=1;
     color[src]=x;
      for(int a :al[src]){
        if(v[a]) continue;
        if(i==x|| i==y){
          i++;
          if(i==x|| i==y){
          i++;
        }
        }
        color[a]=i;
        i++;

      }
      for(int a:al[src]){
        if(!v[a]){
          dfs(a,color[a],x);
        }
      }

    }*/
    static long[] a;
    static long[] b;
    public static boolean possible(double mid,int n){
      double l=a[1]-b[1]*mid;
      double r=a[1]+b[1]*mid;
      for(int i=2;i<=n;i++){
        l=Math.max(l,a[i]-b[i]*mid);
        r=Math.min(r,a[i]+b[i]*mid);

      }
      if(l>r)return false;
      else  return true;
    }

public static boolean isvowel(char ch){
    if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){
        return true;
    }else{
        return false;
    }
}
static long[] fac;
 static long[] inv;
 static long mod=(long)1e9+7;
static int[] prime;
static Integer[] ans;

static ArrayList<Integer>[] al1;
static ArrayList<Integer>[] al2;
static int[] lol1;
static int[] lol2;
static boolean[] v1;
static boolean[] v2;

     public static void main(String args[]) throws IOException
    {
         new Thread(null, new Sample(), "whatever", 1<<26).start();

    }

     boolean findSum(int set[], int n, long sum)
    {
       // Base Cases
       if (sum == 0)
         return true;
       if (n == 0 && sum != 0)
         return false;

       // If last element is greater than sum, then ignore it
       if (set[n-1] > sum)
         return findSum(set, n-1, sum);

       /* else, check if sum can be obtained by any of the following
          (a) including the last element
          (b) excluding the last element   */
       return findSum(set, n-1, sum) ||
                                   findSum(set, n-1, sum-set[n-1]);
    }

    public void run(){
             int n=i();
             int k=i();
             int[] a=new int[n];
             int[] b=new int[k];
             for (int i=0;i<n ;i++ ) {
                a[i]=i();
              }
            for (int i=0;i<k ;i++ ) {
                b[i]=i();
              }
            Arrays.sort(b);
            for (int i=0,j=0;i<n ;i++ ) {
                if(a[i]==0){
                  a[i]=b[j];
                  j++;
                }
              }
            int flag=0;
            for (int i=1;i<n ;i++ ) {
                if(a[i]<a[i-1]){
                  flag=1;
                  break;
                }
              }
            if(flag==1){
              System.out.println("YES");
            }
            else{
              System.out.println("NO");
            }

       }
       public static boolean binarySearch(long[] a,int low,int high,long key){

        if(low>high){
          return false;
        }else{
          int mid=(low+high)/2;
          if(a[mid]==key){
            return true;
          }else if(a[mid]<key){
            return binarySearch(a,mid+1,high,key);
          }
          else{
            return binarySearch(a,low,mid-1,key);
          }
        }

       }
      public static int upper_bound_array(long[] arr, long key) {
    int len = arr.length;
    int lo = 0;
    int hi = len-1;
    int mid = (lo + hi)/2;
    while (true) {
      int cmp = Long.compare(arr[mid],(key));
      if (cmp == 0 || cmp < 0) {
        lo = mid+1;
        if (hi < lo)
          return mid<len-1?mid+1:-1;
      } else {
        hi = mid-1;
        if (hi < lo)
          return mid;
      }
      mid = (lo + hi)/2;
    }
  }

    /////////////////////////////////////////////////////////// shortcuts //////////////////////////////
      public static long modPow(long base, long exp, long mod) {
        base = base % mod;
        long result = 1;
        while (exp > 0) {
            if (exp % 2 == 1) {
                result = (result * base) % mod;
                exp--;
            } else {
                base = (base * base) % mod;
                exp = exp >> 1;
            }

        }
        return result;
    }

    public static void cal() {
        fac = new long[1000005];
        inv = new long[1000005];
        fac[0] = 1;
        inv[0] = 1;
        for (int i = 1; i <= 1000000; i++) {
            fac[i] = (fac[i - 1] * i) % mod;
            inv[i] = (inv[i - 1] * modPow(i, mod - 2, mod)) % mod;
        }
    }

   /* public static long ncr(int n, int r) {
        return (((fac[n] * inv[r]) % mod) * inv[n - r]) % mod;
    }
 */

      static int i() {

          return sc.nextInt();
        }
        static long l(){
          return sc.nextLong();

        }
        static double d() throws IOException{
          return sc.nextDouble();
        }
        static String s(){
          return sc.next();

        }
        static String sL() throws IOException{
          return sc.nextLine();
        }
       static void loop(int[] a) throws IOException{
          for(int j=0;j<a.length;j++){
              a[j]=i();
          }
        }
        static void eloop(int[] a) throws IOException{
          for(int i=1;i<=a.length;i++){
              a[i]=i();
          }
        }
        static void ploop(int[] a)throws IOException{
             for(int j=0;j<a.length;j++){
                System.out.println(a[j]);
             }

        }
        static void eploop(int[] a)throws IOException{
             for(int j=1;j<=a.length;j++){
                System.out.println(a[j]);
             }

        }

        ////////////////////////////////////////////////////////////////////////////////////////////////////

  static class InputReader {
        BufferedReader br;
        StringTokenizer st;

        public InputReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                throw new RuntimeException();
            }
            return str;
        }
    }

 }

/*
ID: mchensd
LANG: JAVA
PROG: http://codeforces.com/problemset/problem/814/A
 */

/**
 *
 * @author Michael
 */

import java.util.*;
import java.io.*;

public class AbandonedSettlement {
    public void run(BufferedReader br, PrintWriter pw) throws IOException {
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if (k > 1) {
            pw.println("Yes");
            return;
        }

        st = new StringTokenizer(br.readLine());
        int[] seq = new int[n];
        for (int i=0; i<n; ++i) {
            seq[i] = Integer.parseInt(st.nextToken());
        }

        int t = Integer.parseInt(br.readLine());
        boolean ans = true;
        for (int i=0; i<n; ++i) {
            if (seq[i] == 0) {
                if (i == 0) ans = seq[i+1] <= t;
                else if (i == n-1) ans = seq[i-1] >= t;
                else ans = seq[i+1] <= t || seq[i-1] >= t;
            }
        }
        if (ans) pw.println("Yes");
        else pw.println("No");

    }
    public static void main(String[] args) throws IOException {
//        new AbandonedSettlement().runFileIO("AbandonedSettlement");
        new AbandonedSettlement().runStdIO();

    }

    public void runFileIO(String filename) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(filename + ".in"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename + ".out")));
        run(br, pw);
        pw.close();
    }

    public void runStdIO() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        run(br, pw);
        pw.close();
    }
}

import java.io.*;
import java.util.*;
import java.math.*;
public class Main {
	static BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));

public static void main(String args[]) throws NumberFormatException, IOException {
	//next<datatype>() for input of a type
	//next<datatyoe>array() for array input of a type
//	StringBuilder s = new StringBuilder();
//	ArrayList<Integer> n =new ArrayList<Integer>();
////	Collections.sort(n, new Mycompare());
//	Collections.sort(n);
	int[] nm= nextIntarray();
	int arr[] = nextIntarray();
	int g[]=nextIntarray();
	int prv=0,cntz=0,z_idx=-1;
	int flg=1;
	for(int i=0;i<nm[0];i++){
		if(arr[i]==0){
			z_idx=i;
			cntz++;
			if(cntz>1){
				break;
			}
		}
		else if(arr[i]<prv){
			flg=0;
			break;
		}
		if(arr[i]!=0)
			prv=arr[i];
	}
	if(cntz>1 || flg==0){
		System.out.println("Yes");
	}
	else{
		if(z_idx!=-1){
			if(z_idx<arr.length-1){
			    if(g[0]>arr[z_idx+1]){
				System.out.println("Yes");
			    }
			    else{
			        System.out.println("No");
			    }
			}
			else if(g[0]<arr[z_idx-1]){
				System.out.println("Yes");
			}
			else{
				System.out.println("No");
			}
		}
		else{
			System.out.println("No");
		}

	}
//	n.add(1);
//	n.add(1);
//	n.add(4);
//	n.add(3);
//	n.add(2);
//	n.add(1);
//	n.removeAll(Arrays.asList(1));
//	ArrayList<Integer> n1 =new ArrayList<Integer>();
//	n.addAll(Arrays.asList(1,2));
//	n1.addAll(Arrays.asList(1,2,3));
//	char x='A';
//	int xa=1;
//	String stt ="sss";
////	stt.substring(beginIndex)
//	while(xa<5){
//	switch (x){
//	case 'A':
//		if(xa==1){
//			System.out.println("Ssss");
//			xa+=2;
//		}
//		break;
//	default:
//		System.out.println(112);
//	}
//	System.out.println(xa);
//	}
//
	}

static class Mycompare implements Comparator<Integer>{
	public int compare(Integer x, Integer y){
		return -1;
	}
}

public static ArrayList<Integer> findPerm(final String A, int B) {
    int cntI=0,cntD=0;
    int ni = B,nd=1;
    ArrayList<Integer> ans = new ArrayList<Integer>();
    for(int i=0;i<B-1;i++){
        if(A.charAt(i)=='D'){
            ans.add(ni);
            System.out.println(ni);
            ni=ni-1;
        }
        else{
            ans.add(nd);
            System.out.println(nd);
            nd+=1;
        }
    }
    ans.add(nd);

     for(int i=0;i<ans.size();i++){
         System.out.println("a"+ans.get(i));
     }
    return ans;
}

private static double[] nextDoublearray() throws IOException {
	String s[]=bf.readLine().split(" ");
	double arr[]=new double[s.length];
	for(int i=0;i<s.length;i++){
		arr[i]=Double.parseDouble(s[i]);
	}
	return arr;
}

private static double nextDouble() throws NumberFormatException, IOException {
	return Double.parseDouble(bf.readLine());
}

private static long GCD(long a, long b) {
	   if (b==0) return a;
	   return GCD(b,a%b);
}

private static long[] nextLongarray() throws IOException {
	String s[]=bf.readLine().split(" ");
	long arr[]=new long[s.length];
	for(int i=0;i<s.length;i++){
		arr[i]=Long.parseLong(s[i]);
	}
	return arr;
	}

private static long nextLong() throws NumberFormatException, IOException {
	return Long.parseLong(bf.readLine());
	}

private static int[] nextIntarray() throws IOException {
	String s[]=bf.readLine().split(" ");
	int arr[]=new int[s.length];
	for(int i=0;i<s.length;i++){
		arr[i]=Integer.parseInt(s[i]);
	}
	return arr;
}

private static int nextInt() throws NumberFormatException, IOException {
	return Integer.parseInt(bf.readLine());
}
private static boolean isPalindrome(String s) {

	  int n = s.length();
	  for (int i=0;i<(n / 2) + 1;++i) {
	     if (s.charAt(i) != s.charAt(n - i - 1)) {
	         return false;
	     }
	  }

	  return true;
	}
private static int factorial(int num)
{
    if (num == 0 || num == 1)
    {
        return 1;
    }
    else
    {
        return(num * factorial(num - 1));
    }
}
private static long power(long b,long e){
if (e == 0) return 1;
	    if (e%2==0) return power(b*b, e/2);
	    /* e is odd */ return b * power(b, e-1);
}
private static long lcm(long a, long b)
{
    return a * (b / GCD(a, b));
}

private static boolean isPrimeNumber(long number){

        for(long i=2; i<=number/2; i++){
            if(number % i == 0){
                return false;
            }
        }
        return true;
    }

/*COMBINATION CODE
	void combinationUtil(int arr[], int n, int r, int index, int data[], int i)
{
    // Current cobination is ready, print it
    if (index == r)
    {
        for (int j=0; j<r; j++)
            printf("%d ",data[j]);
        printf("\n");
        return;
    }

    // When no more elements are there to put in data[]
    if (i >= n)
        return;

    // current is included, put next at next location
    data[index] = arr[i];
    combinationUtil(arr, n, r, index+1, data, i+1);

    // current is excluded, replace it with next (Note that
    // i+1 is passed, but index is not changed)
    combinationUtil(arr, n, r, index, data, i+1);

	}
		 */

//PERMUTATION CODE
/*

		 void permute(char *a, int l, int r)
	{
   int i;
   if (l == r)
     printf("%s\n", a);
   else
   {
       for (i = l; i <= r; i++)
       {
          swap((a+l), (a+i));
          permute(a, l+1, r);
          swap((a+l), (a+i)); //backtrack
       }
   }
	}*/

}

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            for (int i = 0; i < n - 1; i++) {
                if (a[i] == 0) {
                    a[i] = b[0];
                }
            }
            for (int i = 0; i < n - 1; i++) {
                if (a[i + 1] < a[i]) return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        if (check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class t1 {
 public static void main(String[] args) {
     Scanner s=new Scanner(System.in);
    int n=s.nextInt();
    int n2=s.nextInt();
    ArrayList<Integer> a1=new ArrayList<>();
    ArrayList<Integer> a2=new ArrayList<>();
    for(int i=0;i<n;i++)
        a1.add(s.nextInt());
    for(int i=0;i<n2;i++)
        a2.add(s.nextInt());
    ArrayList<Integer> a2c=new ArrayList<>(a2);
    Collections.sort(a2c);
    if(a1.get(0)>=a1.get(n-1)&&n!=2){
        System.out.println("Yes");
        System.exit(0);}
    else if(!(a2c.equals(a2))){
        System.out.println("Yes");
        System.exit(0);}
    for(int i=a1.indexOf(0),j=0;j<n2;i++,j++ )
        a1.set(i,a2.get(j));
    ArrayList<Integer> a1c=new ArrayList<>(a1);
    Collections.sort(a1c);
    if(a1c.equals(a1)){
         if(n2>1){
             int fn=a2.get(0);
             for(int i=1;i<n2;i++)
                 if(a2.get(i)!=fn){
                     System.out.println("Yes");
                     System.exit(0);}
             System.out.println("No");
         }
         else
             System.out.println("No");
    }
    else
         System.out.println("Yes");
    }
}

import java.util.*;
import java.io.*;
public class Round418q1{
  static class FastReader{
    BufferedReader br;
    StringTokenizer st;
    public FastReader(){
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    int nextInt(){
      return Integer.parseInt(next());
    }
    String next(){
      while(st==null || !st.hasMoreElements()){
        try{
          st = new StringTokenizer(br.readLine());
        }
        catch (IOException e){
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

  }

  static ArrayList<Integer> kList;
  static int greatestLesThanNum;
  public static void main(String[] args) throws IOException{
    FastReader fr = new FastReader();
    BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
    int  n = fr.nextInt();
    int k = fr.nextInt();
    ArrayList<Integer> list = new ArrayList<>();
    kList = new ArrayList<>();
    for(int i=0;i<n;i++){
      list.add(fr.nextInt());
    }
    for(int i=0;i<k;i++){
      kList.add(fr.nextInt());
    }
    Collections.sort(kList);
    for(int i=0;i<n;i++){
      if(list.get(i)==0){
        if(i==0){
          list.set(0, kList.get(kList.size()-1));
        }
        else{
          greatestLesThanNum = -1;
          int num = searchLessThan(list.get(i-1),0,kList.size()-1);
          if(num==-1){
            num = kList.get(kList.size()-1);
            kList.remove(kList.size()-1);
          }
          list.set(i,num);
        }
      }
    }
    String ans = "No";
    for(int i=1;i<n;i++){
      //System.out.println(list.get(i)+" "+ list.get(i-1));

      if(list.get(i)< list.get(i-1)){
        ans = "Yes";
      }
      if(list.get(i)==list.get(i-1)){
        ans ="No";
        break;
      }
    }
    out.write(ans+"\n");
    out.flush();
  }

  static int searchLessThan(int n, int start, int end){
    if(start>end){
      return -1;
    }
    int mid = (start+end)/2;

    if(kList.get(mid)>=n && (mid+1>end || kList.get(mid+1)<n)){
      int temp = kList.get(mid);
      kList.remove(mid);
      return temp;
    }
    if(kList.get(mid)<=n){
      return searchLessThan(n, mid+1, end);
    }
    if(kList.get(mid)>n)
      return searchLessThan(n, start, mid-1);
    return -1;
  }
}

import java.util.Scanner;
import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;
import static java.lang.Math.*;

public class main implements Runnable{

    static LinkedList <Integer> adj[];
    static int co=0,f=0;

    static void Check2(int n){
        adj=new LinkedList[n+1];
        for(int i=0;i<=n;i++){
            adj[i]=new LinkedList();
        }

    }
    static void add(int i,int j){
        adj[i].add(j);
    }
    public static void main(String[] args) throws Exception {
        new Thread(null, new main(), "Check2", 1<<26).start();// to increse stack size in java
    }
    static long mod=(long)(1e9+7);
    static long le[];
    static int n;
    public void run(){
        /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
        //Scanner in=new Scanner(System.in);
        InputReader in=new InputReader(System.in);
        PrintWriter w=new PrintWriter(System.out);

        int n=in.nextInt();
        int k=in.nextInt();
        int a[]=new int[n];
        int b[]=new int[k];
        for(int i=0;i<n;i++)
        {

            a[i]=in.nextInt();
        }
        for(int i=0;i<k;i++)
        {
            b[i]=in.nextInt();
        }

        if(k>1){
            int flag=0;
            for(int i=0;i<n-1;i++){
                if(a[i+1]<=a[i]){
                    flag=1;
                }
            }
            if(flag==1)w.println("Yes");
            else
                w.println("No");

        }
        else{

            int prv=Integer.MIN_VALUE;
            int next=Integer.MAX_VALUE;
            for(int i=0;i<n;i++)
            {

                if(a[i]==0){
                    prv=(i==0?prv:a[i-1]);
                    next=(i==n-1?next:a[i+1]);
                }

            }

            if(b[0]>prv&&b[0]<next){
                w.println("No");
            }
            else
                w.println("Yes");

        }

        // rec("",0,0,3);
        w.close();
    }

    static void dfs(int i,int lvl,int v[]){

        v[i]=1;
        //   System.out.println(i);
        le[1]=(long)(le[1])+1l;
        if(lvl+1<=n){
            le[lvl+1]-=1l;
        }
        Iterator <Integer> ne=adj[i].iterator();
        while(ne.hasNext()){
            int k=ne.next();

            if(v[k]==0){
                v[k]=1;
                dfs(k,lvl+1,v);
            }

        }

    }
    static class node{

        int y;
        int val;

        node(int a,int b){

            y=a;
            val=b;

        }

    }
    static  void rec(String s,int a,int b,int n){

        if(b==n){
            System.out.println(s);
            return ;
        }
        String p=s;
        if(a>b){
            s=p+")" ;
            rec(s,a,b+1,n);
        }
        if(a<n){
            s=p+"(";
            rec(s,a+1,b,n);
        }

    }

    static class InputReader
    {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream)
        {
            this.stream = stream;
        }

        public int read()
        {
            if (numChars==-1)
                throw new InputMismatchException();

            if (curChar >= numChars)
            {
                curChar = 0;
                try
                {
                    numChars = stream.read(buf);
                }
                catch (IOException e)
                {
                    throw new InputMismatchException();
                }

                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine()
        {
            BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
        public int nextInt()
        {
            int c = read();

            while(isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-')
            {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do
            {
                if(c<'0'||c>'9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do
            {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-')
            {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.')
            {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.')
            {
                c = read();
                double m = 1;
                while (!isSpaceChar(c))
                {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString()
        {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do
            {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c)
        {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next()
        {
            return readString();
        }

        public interface SpaceCharFilter
        {
            public boolean isSpaceChar(int ch);
        }
    }

}

import java.util.*;
import java.io.*;
public class sequence {
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      StringTokenizer str = new StringTokenizer(sc.nextLine());
      int a = Integer.parseInt(str.nextToken());
      int b = Integer.parseInt(str.nextToken());

      int[] h = new int[a];
      str = new StringTokenizer(sc.nextLine());
      for(int i = 0; i < a; i++){
          h[i] = Integer.parseInt(str.nextToken());
      }

      int[] reverse = new int[b];
      str = new StringTokenizer(sc.nextLine());
      for(int i = 0; i < b; i++){
         reverse[i] = Integer.parseInt(str.nextToken());
      }
      int[] k = new int[b];
      for(int i = 0; i < k.length; i++){
         k[i] = reverse[b-i-1];
      }
      int index = 0;
      for(int i = 0; i < h.length; i++){
         if(h[i] == 0){
            h[i] = k[index];
            index++;
         }
      }

      boolean increasing = true;
      for(int i = 1; i < h.length; i++){
         if(h[i-1] > h[i]){
            increasing = false;
          }
      }
      if(increasing)
         System.out.println("No");
      else
         System.out.println("Yes");
   }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class abandoned {
    static void comparetwo(int[] arr,int[] mix,int k,int jusval){
        if(k>1){
            System.out.println("Yes");
            return;
        }
        else{
            int high;
            int low;
            if(jusval>0 && arr[arr.length-1]!=0){
                low = jusval-1;
                high = jusval+1;
                int kval=0;
                if(arr[low]<mix[0] && mix[0]<arr[high]){
                    for(int i=0;i<arr.length-1;i++){
                        if(arr[i]>=arr[i+1]){
                            kval++;
                            break;
                        }
                    }
                    if(kval==0){
                        System.out.println("Yes");
                        return;
                    }
                    else{
                        System.out.println("No");
                        return;
                    }

                }
            }
            else if (arr[arr.length-1]==0){
                low = jusval-1;
                if(arr[low]<mix[0]){
                    System.out.println("No");
                    return;
                }
                else {
                    System.out.println("Yes");
                    return;
                }
            }
            else{
                high = jusval+1;
                if(arr[high]<mix[0]){
                    System.out.println("Yes");
                    return;
                }
                else{
                    System.out.println("No");
                    return;
                }

            }

        }
        return;

    }
    public static void main(String[] args){
        int n,k;
        FastReader fastReader=new FastReader();
        n=fastReader.nextInt();
        k= fastReader.nextInt();
        int[] test = new int[n];
        int[] mix = new int[k];
        int count=0;
        for (int i=0;i<n;i++){
            test[i] = fastReader.nextInt();
            if(test[i]==0){
                count=i;
            }
        }
        for (int i=0;i<k;i++){
            mix[i] = fastReader.nextInt();
        }
        comparetwo(test,mix,k,count);

    }
}
class FastReader {
    public static BufferedReader br;
    public static StringTokenizer st;
    public FastReader(){
        br = new BufferedReader(new InputStreamReader(System.in));
    }
    static String next() {
        while(st==null || !st.hasMoreElements()) try {
            st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
            e.printStackTrace();
        }
        return st.nextToken();
    }
    public static int nextInt(){
        return  Integer.parseInt(next());
    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastInput in = new FastInput(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, FastInput in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int[] a = new int[n];
            int min = 200;
            int max = 0;
            for (int i = 0; i < n; ++i) a[i] = in.nextInt();
            for (int i = 0; i < k; ++i) {
                int x = in.nextInt();
                min = Math.min(min, x);
                max = Math.max(max, x);
            }

            int prev = a[0];
            boolean isValid = true;
            for (int i = 1; i < n; ++i) {
                if (a[i] == 0 && (prev > min || prev > max)) {
                    out.print("Yes");
                    return;
                }

                if (a[i] != 0 && a[i] > a[i - 1]) isValid = false;

                prev = a[i];
            }

            if (isValid) out.print("Yes");
            else out.print("No");
        }

    }

    static class FastInput {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public FastInput(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alexander Tsupko (alexander.tsupko@outlook.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt(), k = in.nextInt();
            int[] a = in.nextIntArray(n), b = in.nextIntArray(k), c = new int[n];
            int count = factorial(k), shift = --k;
            if (count == 1) {
                if (!isSorted(out, n, a, b, c)) return;
                out.println("No");
                return;
            }
            while (count-- > 0) {
                int temp = b[shift];
                b[shift] = b[shift - 1];
                b[shift - 1] = temp;
                if (!isSorted(out, n, a, b, c)) return;
                shift = shift < 2 ? k : shift - 1;
            }
            out.println("No");
        }

        private boolean isSorted(OutputWriter out, int n, int[] a, int[] b, int[] c) {
            for (int i = 0, j = 0; i < n; ++i) c[i] = a[i] != 0 ? a[i] : b[j++];
            for (int i = 1; i < n; ++i) {
                if (c[i - 1] >= c[i]) {
                    out.println("Yes");
                    return false;
                }
            }
            return true;
        }

        private int factorial(int k) {
            return k > 0 ? k * factorial(k - 1) : 1;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buffer = new byte[1024];
        private int current;
        private int size;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (size == -1) throw new InputMismatchException();
            if (current >= size) {
                current = 0;
                try {
                    size = stream.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (size <= 0) return -1;
            }
            return buffer[current++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceCharacter(c)) c = read();
            int sign = 1;
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                result *= 10;
                result += c - '0';
                c = read();
            } while (!isSpaceCharacter(c));
            return result * sign;
        }

        private boolean isSpaceCharacter(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) array[i] = nextInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(String s) {
            writer.println(s);
        }

    }
}

import java.util.Scanner;
//import java.util.Arrays;
public class Solution {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int k = s.nextInt();

		int[]org = new int[n];
		int[]sho = new int[k];

		for(int i=0;i<n;i++){
			org[i] = s.nextInt();
		}
		for(int i=0;i<k;i++){
			sho[i] = s.nextInt();
		}
		int flag=0;
		if(k>=2)
			System.out.println("Yes");
		else{
			for(int i=0;i<n;i++){
				if(org[i]==0){
					org[i]=sho[0];break;
				}
			}
			for(int i=0;i<n-1;i++){
				if(org[i+1] < org[i]){
					System.out.println("Yes");
					flag=1;
					break;
				}
			}
		}
		if(flag==0)
			System.out.println("No");
	}
}

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Task814A {
    private static ArrayList<Integer> a, b, zeroPositions;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n, k;
        n = in.nextInt();
        k = in.nextInt();
        a = new ArrayList<>(n);
        b = new ArrayList<>(k);
        zeroPositions = new ArrayList<>(n);

        int temp;
        for (int i = 0; i < n; ++i) {
            temp = in.nextInt();
            a.add(temp);
            if (temp == 0) {
                zeroPositions.add(i);
            }
        }
        for (int i = 0; i < k; ++i) b.add(in.nextInt());

        if (zeroPositions.size() < k) {
            out.println("No");
        } else if (zeroPositions.size() > 1
                || zeroPositions.size() == 0) {
            out.println("Yes");
        } else {
            /*
            * case when count of zero is 1
            * */
            int pos = zeroPositions.get(0);
            if (!checkSequence(pos + 1) && checkSequence(pos - 1)) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }
        out.flush();
    }

    private static boolean checkSequence(int pos) {
        try {
            return a.get(pos) > b.get(zeroPositions.size() - 1) || a.get(pos) > b.get(0);
        } catch (IndexOutOfBoundsException e) {
            return true;
        }
    }
}

/*
 * Remember a 7.0 student can know more than a 10.0 student.
 * Grades don't determine intelligence, they test obedience.
 * I Never Give Up.
 */
import java.util.*;
import java.io.*;

import static java.lang.System.out;
import static java.util.Arrays.sort;
import static java.util.Arrays.copyOf;
import static java.util.Arrays.binarySearch;
import static java.lang.Math.pow;
//import static java.lang.Math.sqrt;
//import static java.lang.Math.ceil;
import static java.lang.Math.abs;
//import static java.lang.Math.min;
//import static java.lang.Math.max;
//import static java.lang.Math.floor;
public class ContestMain {
	private static Reader in=new Reader();
	private static StringBuilder ans=new StringBuilder();
//	private static long MOD=1000000007;//10^9+7
//	private static final int N=(int)100001;
//	private static final double PI=3.1415;
//	private static ArrayList<Integer> v[]=new ArrayList[N];
//	private static long color[]=new long[2]; //For Graph Coloring
//	private static boolean mark[]=new boolean [N];
//	static int choice=Integer.MAX_VALUE,trav=Integer.MAX_VALUE;
//	private static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//	public static void dfs(int node){for(int x:v[node]){if(!mark[x]){dfs(x);}}}

	public static void solve(int ar[],int kr[],int n,int k){
		boolean flag=false;
		for(int i=0;i<n;i++){
			if(ar[i]==0){
				for(int j=0;j<k;j++){
					if(i+1<n&&kr[j]>=ar[i+1]){
						flag=true;
						break;
					}
					else if(i-1>=0&&kr[j]<=ar[i-1]){
						flag=true;
						break;
					}
				}
			}
			if(flag)break;
		}
		if(flag)out.println("YES");
		else out.println("NO");
	}

	public static void main(String[] args) throws IOException{
		int n=in.nextInt();
		int k=in.nextInt();
		int ar[]=new int[n];
		int kr[]=new int[k];
		for(int i=0;i<n;i++)
			ar[i]=in.nextInt();
		for(int i=0;i<k;i++)
			kr[i]=in.nextInt();
		solve(ar,kr,n,k);

	}
	static class Reader{
        BufferedReader br;
        StringTokenizer st;

        public Reader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
					int kt = kid[t-1];
				kid[k]=arr[p];
				p=p+1;
				if(p == t1 && kt == 0){
					System.out.println("YES");
					b= true;
					break;
				}
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
	}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Collections;
import java.util.StringTokenizer;

public class ProblemA {

	public static void main(String[] args) throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		StringTokenizer st;

			line = br.readLine();
			st = new StringTokenizer(line);
			int n = Integer.parseInt(st.nextToken());
			int k = Integer.parseInt(st.nextToken());
			line = br.readLine();
			int[] a = new int[n];
			int[] b = new int[k];
			String result = "";
			if(k > 1)
				result = "Yes";
			else
			{
				for(int i = 0;i < a.length;i++)
				{
					if(a[i] == 0)
					{
						a[i] = b[0];
						break;
					}
				}

				if(isIncreasing(a))
					result = "No";
				else
					result = "Yes";
			}

			System.out.println(result);
		}

	public static boolean isIncreasing(int[] x)
	{
		boolean flag = true;

		for(int i = 0;i < x.length - 1;i++)
		{
			if(x[i+1] <= x[i])
				flag = false;
		}

		return flag;
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alexander Tsupko (alexander.tsupko@outlook.com)
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt(), k = in.nextInt();
            int[] a = in.nextIntArray(n), b = in.nextIntArray(k), c = new int[n], copy = new int[k];
            System.arraycopy(b, 0, copy, 0, k);
            int count = factorial(k), shift = --k;
            if (count == 1) {
                if (!isSorted(out, n, a, b, c)) return;
                out.println("No");
                return;
            }
            boolean flag = false;
            while (count-- > 0) {
                if (!isSorted(out, n, a, b, c)) return;
                int temp = b[shift];
                b[shift] = b[shift - 1];
                b[shift - 1] = temp;
                if (shift < 2) {
                    shift = k;
                    if (Arrays.equals(b, copy)) flag = true;
                    if (flag) break;
                } else shift--;
            }
            out.println("No");
        }

        private boolean isSorted(OutputWriter out, int n, int[] a, int[] b, int[] c) {
            for (int i = 0, j = 0; i < n; ++i) c[i] = a[i] != 0 ? a[i] : b[j++];
            for (int i = 1; i < n; ++i)
                if (c[i - 1] > c[i]) {
                    out.println("Yes");
                    return false;
                }
            return true;
        }

        private int factorial(int k) {
            return k > 0 ? k * factorial(k - 1) : 1;
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buffer = new byte[1024];
        private int current;
        private int size;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (size == -1) throw new InputMismatchException();
            if (current >= size) {
                current = 0;
                try {
                    size = stream.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (size <= 0) return -1;
            }
            return buffer[current++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceCharacter(c)) c = read();
            int sign = 1;
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if (c < '0' || c > '9') throw new InputMismatchException();
                result *= 10;
                result += c - '0';
                c = read();
            } while (!isSpaceCharacter(c));
            return result * sign;
        }

        private boolean isSpaceCharacter(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) array[i] = nextInt();
            return array;
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(String s) {
            writer.println(s);
        }

    }
}

import java.util.*;
import java.io.*;
import static java.util.Arrays.*;

public class Main {

    public static void main(String[] args) {
        FastReader in = new FastReader();
        int n = in.nextInt();
        int k = in.nextInt();
        int [] a  = new int[n];
        int [] b = new int[k];
        for(int i =0;i<a.length;i++){
            a[i] = in.nextInt();
        }
      for(int i= 0;i<b.length;i++){
          b[i] = in.nextInt();
      }
       boolean flag =  false;
        if(a.length!=1){
            for(int i =0;i<a.length;i++){
                if(a[i]==0&&i>0){
                    for(int j =0;j<b.length;j++){
                        if(b[j]<=a[i-1]||b[j]>=a[i+1]){
                            a[i] = b[j];
                            flag= true;
                        }
                    }
                }else if(a[i]==0&&i==0){
                    for(int h = b.length-1;h>=0;h--){
                        a[i] = b[h];
                    }
                    for(int o =0;o<a.length;o++){
                        for(int t = o+1;t<a.length;t++){
                            if(a[t]<a[o]){
                                flag = true;
                            }
                    }
                }
                    break;
            }
            }
            if(flag){
                System.out.println("Yes");
            }else {
                System.out.println("No");
            }

    }

    }
}

class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
        br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
        while (st == null || !st.hasMoreElements()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    int nextInt() {
        return Integer.parseInt(next());
    }

    long nextLong() {
        return Long.parseLong(next());
    }

    double nextDouble() {
        return Double.parseDouble(next());
    }

    String nextLine() {
        String str = "";
        try {
            str = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return str;
    }
}

/*
 * DA-IICT
 * Author: Jugal Kalal
 */
import java.util.*;
import java.io.*;
import java.math.*;
public class Fuck{
//	static long MOD=(long)Math.pow(10,9)+7;
	static final int lint=Integer.MAX_VALUE;
	static final double ldouble=Double.MAX_VALUE;
	public static void main(String args[]) {
        new Thread(null, new Runnable() {
            public void run() {
                try{
                    solve();
                    w.close();
                }
                catch(Exception e){
                    e.printStackTrace();
                }
            }
        }, "1", 1 << 26).start();
	}
	static InputReader in;
    static PrintWriter w;
    static void solve(){
        in = new InputReader(System.in);
        w = new PrintWriter(System.out);
        int n=in.nextInt();
        int m=in.nextInt();
        int a[]=new int[n];
        ArrayList<Integer> a1=new ArrayList<Integer>();
        ArrayList<Integer> a2=new ArrayList<Integer>();
        for(int i=0;i<n;i++){
        	a[i]=in.nextInt();
        	if(a[i]!=0){
	        	a1.add(a[i]);
	        	a2.add(a[i]);
        	}
        }
        int b[]=new int[m];
        for(int i=0;i<m;i++){
        	b[i]=in.nextInt();
        }
        Collections.sort(a1);
        boolean flag=false;
        for(int i=0;i<a1.size();i++){
        	if(a1.get(i)!=a2.get(i)){
        		flag=true;
        	}
        }
        if(a1.size()==1){
        	if(m==1){
        		if(a[0]==0&&b[0]<a[1]){
        			w.println("No");
        		}
        		else if(a[1]==0&&b[0]>a[0]){
        			w.println("No");
        		}else{
        			w.println("Yes");
        		}
        	}else{
        		w.println("Yes");
        	}
        }
        else if(!flag&&m>1){
        	w.println("Yes");
        }else{
        	if(m>1){
        		w.println("Yes");
        	}
        	else{
        		for(int i=0;i<a.length;i++){
        			if(a[i]==0){
        				if(i==0&&b[0]<a[i+1]){
        					w.println("No");
        				}
        				else if(a[i-1]<b[0]&&b[0]<a[i+1]){
        					w.println("No");
        				}else{
        					w.println("Yes");
        				}
        			}
        		}
        	}
        }
    }
    static boolean visited[];
    static ArrayList<Integer> adj[]; //Adjacency Lists
    static int V;   // No. of vertices
    // Constructor
    static void Graph(int v){
        V = v;
        visited=new boolean[v];
        adj = new ArrayList[v];
        for (int i=0; i<v; ++i){
        	adj[i] = new ArrayList();
        }
    }
    // Function to add an edge into the graph
    static void addEdge(int v,int w){
		adj[v].add(w);
		adj[w].add(v);
    }
    static void bfs(int s,int n){
    	LinkedList<Integer> queue=new LinkedList<Integer>();
    	LinkedList<Integer> lev=new LinkedList<Integer>();
    	lev.add(0);
    	queue.add(s);
    	visited[s]=true;
    	while(!queue.isEmpty()){
    		int num=queue.pop();
    		int l=lev.pop();
    		for(int i=0;i<adj[num].size();i++){
    			if(!visited[adj[num].get(i)]){
    				visited[adj[num].get(i)]=true;
    				queue.add(adj[num].get(i));
    				lev.add(l+1);
    			}
    		}
    	}

    }
    class Comp implements Comparator<ArrayList<Integer>>{
        @Override
        public int compare(ArrayList<Integer> arr1,ArrayList<Integer> arr2){
        	int min=Integer.min(arr1.size(), arr2.size());
            for(int i=0;i<min;i++){
            	if(arr1.get(i)>arr2.get(i)){
            		return 1;
            	}
            	if(arr1.get(i)<arr2.get(i)){
            		return -1;
            	}
            }
            if(arr1.size()>arr2.size()){
            	return 1;
            }
            if(arr1.size()<arr2.size()){
            	return -1;
            }
            return 0;
        }
    }
    static long power(long base, long exponent, long modulus){
	    long result = 1L;
	    while (exponent > 0) {
	        if (exponent % 2L == 1L)
	            result = (result * base) % modulus;
	        exponent = exponent >> 1;
	        base = (base * base) % modulus;
	    }
	    return result;
	}
    static HashMap<Long,Long> primeFactors(long n){
        HashMap<Long,Long> ans=new HashMap<Long,Long>();
    	// Print the number of 2s that divide n
        while (n%2L==0L)
        {
            if(ans.containsKey(2L)){
            	ans.put(2L,ans.get(2L)+1L);
            }else{
            	ans.put(2L,1L);
            }
            n /= 2L;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2L)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {
            	if(ans.containsKey(i)){
                	ans.put(i,ans.get(i)+1L);
                }else{
                	ans.put(i,1L);
                }
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            ans.put(n,1L);
        return ans;
    }
//	static long gcd(long a,long b){
//		if(a==0){
//			return b;
//		}
//		return gcd(b%a,a);
//	}
	static boolean isPrime[];
////for marking all prime numbers greater than 1 and less than equal to N
	static void sieve(int N) {
	 isPrime=new boolean[N+1];
	 isPrime[0] = true;
	 isPrime[1] = true;
	 for(int i = 2; i * i <= N; ++i) {
	      if(isPrime[i] == false) {//Mark all the multiples of i as composite numbers
	          for(int j = i * i; j <= N ;j += i)
	              isPrime[j] = true;
	     }
	 }
	}
//  //if  str2 (pattern) is subsequence of str1 (Text) or not
//	static boolean function(String str1,String str2){
//	     str2 = str2.replace("", ".*");  //returns .*a.*n.*n.*a.
//	     return (str1.matches(str2));  // returns true
//	}
    static int Arr[];
    static long size[];
  //modified initialize function:
    static void initialize(int N){
    	Arr=new int[N];
    	size=new long[N];
        for(int i = 0;i<N;i++){
        	Arr[ i ] = i ;
        	size[ i ] = 1;
        }
    }
    static boolean find(int A,int B){
        if( root(A)==root(B) )       //if A and B have same root,means they are connected.
        return true;
        else
        return false;
    }
 // modified root function.
    static void weighted_union(int A,int B,int n){
        int root_A = root(A);
        int root_B = root(B);
        if(size[root_A] < size[root_B ]){
        	Arr[ root_A ] = Arr[root_B];
        	size[root_B] += size[root_A];
        }
        else{
        	Arr[ root_B ] = Arr[root_A];
        	size[root_A] += size[root_B];
        }
    }
    static int root (int i){
        while(Arr[ i ] != i){
            Arr[ i ] = Arr[ Arr[ i ] ] ;
            i = Arr[ i ];
        }
        return i;
    }

	static boolean isPrime(long n) {
		if(n < 2L) return false;
		if(n == 2L || n == 3L) return true;
		if(n%2L == 0 || n%3L == 0) return false;
		long sqrtN = (long)Math.sqrt(n)+1L;
		for(long i = 6L; i <= sqrtN; i += 6L) {
			if(n%(i-1) == 0 || n%(i+1) == 0) return false;
		}
		return true;
	}
//	static boolean T[][][];
//	static void subsetSum(int input[], int total, int count) {
//        T = new boolean[input.length + 1][total + 1][count+1];
//        for (int i = 0; i <= input.length; i++) {
//        	T[i][0][0] = true;
//        	for(int j = 1; j<=count; j++){
//        		T[i][0][j] = false;
//        	}
//        }
//        int sum[]=new int[input.length+1];
//        for(int i=1;i<=input.length;i++){
//            sum[i]=sum[i-1]+input[i-1];
//        }
//        for (int i = 1; i <= input.length; i++) {
//            for (int j = 1; j <= (int)Math.min(total,sum[i]); j++) {
//            	for (int k = 1; k <= (int)Math.min(i,count); k++){
//            		 if (j >= input[i - 1]) {//Exclude and Include
//                         T[i][j][k] = T[i - 1][j][k] || T[i - 1][j - input[i - 1]][k-1];
//                     } else {
//                         T[i][j][k] = T[i-1][j][k];
//                     }
//            	}
//            }
//        }
//    }
//	static <K,V extends Comparable<? super V>>
//	SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map) {
//	    SortedSet<Map.Entry<K,V>> sortedEntries = new TreeSet<Map.Entry<K,V>>(
//	        new Comparator<Map.Entry<K,V>>() {
//	            @Override public int compare(Map.Entry<K,V> e1, Map.Entry<K,V> e2) {
//	                int res = e2.getValue().compareTo(e1.getValue());
//	                return res != 0 ? res : 1;
//	            }
//	        }
//	    );
//	    sortedEntries.addAll(map.entrySet());
//	    return sortedEntries;
//	}

	//minimum prime factor of all the numbers less than n
    static int minPrime[];
	static void minimumPrime(int n){
		minPrime=new int[n+1];
		minPrime[1]=1;
        for (int i = 2; i * i <= n; ++i) {
            if (minPrime[i] == 0) {         //If i is prime
                for (int j = i * i; j <= n; j += i) {
                    if (minPrime[j] == 0) {
                        minPrime[j] = i;
                    }
                }
            }
        }
        for (int i = 2; i <= n; ++i) {
            if (minPrime[i] == 0) {
                minPrime[i] = i;
            }
        }
	}
	static long modInverse(long A, long M)
	{
		long x=extendedEuclid(A,M)[0];
		return (x%M+M)%M;    //x may be negative
	}
	static long[] extendedEuclid(long A, long B) {
		if(B == 0) {
			long d = A;
			long x = 1;
			long y = 0;
			return new long[]{x,y,d};
		}
		else {
			long arr[]=extendedEuclid(B, A%B);
			long temp = arr[0];
			arr[0] = arr[1];
			arr[1] = temp - (A/B)*arr[1];
			return arr;
		}
	}

	static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
	}
}
//class Pair {
//	int x,y,z;
//
//    Pair(int x,int y,int z){
//        this.x=x;
//        this.y=y;
//        this.z=z;
//    }
//	public int hashCode() {
//		final int prime = 31;
//		int result = 1;
//		result = prime * result + x;
//		result = prime * result + y;
//		result = prime * result + z;
//		return result;
//	}
//
//	public boolean equals(Object obj) {
//		if (this == obj)
//			return true;
//		if (obj == null)
//			return false;
//		if (getClass() != obj.getClass())
//			return false;
//		Pair other = (Pair) obj;
//		if (x != other.x)
//			return false;
//		if (y != other.y)
//			return false;
//		if (z != other.z)
//			return false;
//		return true;
//	}
//}

/*
ID: mchensd
LANG: JAVA
PROG: http://codeforces.com/problemset/problem/814/A
 */

/**
 *
 * @author Michael
 */

import java.util.*;
import java.io.*;

public class AbandonedSettlement {
    public void run(BufferedReader br, PrintWriter pw) throws IOException {
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if (k > 1) {
            pw.println("Yes");
            return;
        }

        st = new StringTokenizer(br.readLine());
        int[] seq = new int[n];
        for (int i=0; i<n; ++i) {
            seq[i] = Integer.parseInt(st.nextToken());
        }

        int t = Integer.parseInt(br.readLine());
        boolean ans = true;
        for (int i=0; i<n; ++i) {
            if (seq[i] == 0) {
                if (i == 0) ans = seq[i+1] <= t;
                else if (i == n-1) ans = seq[i-1] >= t;
                else ans = seq[i+1] <= t || seq[i-1] >= t;
            }
        }
        if (ans) pw.println("Yes");
        else pw.println("No");

    }
    public static void main(String[] args) throws IOException {
//        new AbandonedSettlement().runFileIO("AbandonedSettlement");
        new AbandonedSettlement().runStdIO();

    }

    public void runFileIO(String filename) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(filename + ".in"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename + ".out")));
        run(br, pw);
        pw.close();
    }

    public void runStdIO() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        run(br, pw);
        pw.close();
    }
}

import java.io.*;    //PrintWriter
import java.math.*;  //BigInteger, BigDecimal
import java.util.*;  //StringTokenizer, ArrayList

public class R418_Div2_A
{
	FastReader in;
	PrintWriter out;

	public static void main(String[] args)  {
		new R418_Div2_A().run();
	}

	void run()
	{
		in = new FastReader(System.in);
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	void solve()
	{
		int n = in.nextInt();
		int k = in.nextInt();

		int[] a = new int[n];
		ArrayList<Integer> al1 = new ArrayList<>();
		ArrayList<Integer> al2 = new ArrayList<>();
		int zInd = -1;
		for (int i = 0; i < n; i++)
		{
			a[i] = in.nextInt();
			if (a[i] == 0)
			{
				zInd = i;
			}
			else
			{
				al1.add(a[i]);
				al2.add(a[i]);
			}
		}
		boolean yes = false;

		Collections.sort(al1);
		for (int i = 0; i < al1.size(); i++)
			if (al1.get(i) != al2.get(i))
				yes = true;

		int[] b = new int[k];
		for (int i = 0; i < k; i++)
			b[i] = in.nextInt();

		if (!yes && k > 1)
			yes = true;
		else
		{
			if ((zInd > 0 && a[zInd-1] >= b[0])
			|| (zInd < n-1 && b[0] >= a[zInd+1]))
				yes = true;
		}
		out.println(yes ? "Yes" : "No");
	}

	//-----------------------------------------------------
	void runWithFiles() {
		in = new FastReader(new File("input.txt"));
		try {
			out = new PrintWriter(new File("output.txt"));
		}
		catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		solve();
		out.close();
	}

	class FastReader
	{
	    BufferedReader br;
	    StringTokenizer tokenizer;

	    public FastReader(InputStream stream)
	    {
	        br = new BufferedReader(new InputStreamReader(stream));
	        tokenizer = null;
	    }
		public FastReader(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
				tokenizer = null;
			}
			catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

	    private String next() {
	        while (tokenizer == null || !tokenizer.hasMoreTokens())
	            try {
	            	tokenizer = new StringTokenizer(br.readLine());
	            }
	            catch (IOException e) {
	                throw new RuntimeException(e);
	            }
	        return tokenizer.nextToken();
	    }
		public String nextLine() {
			try	{
				return br.readLine();
			}
			catch(Exception e) {
				throw(new RuntimeException());
			}
		}

	    int nextInt() {
	        return Integer.parseInt(next());
	    }
	    long nextLong() {
	        return Long.parseLong(next());
	    }
	    double nextDouble() {
	        return Double.parseDouble(next());
	    }
	    BigInteger nextBigInteger() {
	        return new BigInteger(next());
	    }
	    BigDecimal nextBigDecimal() {
	        return new BigDecimal(next());
	    }
	}
}

import java.util.Scanner;

public class increasingSequence {

	public static void main(String[] args) {
		Scanner console = new Scanner(System.in);
		int a = console.nextInt();
		int b = console.nextInt();
		int[] A = new int[a];
		int[] B = new int[b];
		for (int i = 0; i < a; i++) {
			A[i] = console.nextInt();
		}
		for (int i = 0; i < b; i++) {
			B[i] = console.nextInt();
		}

		if (b > 1) {
			System.out.println("Yes");
		} else {
			for (int i = 0; i < a; i++) {
				if (A[i] == 0) {
					if (i != 0 && A[i - 1] > B[0]) {
						System.out.println("Yes");
					} else if (i - 1 != a && A[i + 1] < B[0]) {
						System.out.println("Yes");
					} else {
						System.out.println("No");
					}
				}
			}
		}

	}

}

import java.util.*;

public class Main {

	void merge(int arr[], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        int L[] = new int [n1];
        int R[] = new int [n2];

        /*Copy data to temp arrays*/
        for (int i=0; i<n1; ++i)
            L[i] = arr[l + i];
        for (int j=0; j<n2; ++j)
            R[j] = arr[m + 1+ j];

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2)
        {
            if (L[i] <= R[j])
            {
                arr[k] = R[j];
                j++;
            }
            else
            {
                arr[k] = L[i];
                i++;
            }
            k++;
        }

        /* Copy remaining e
         * lements of L[] if any */
        while (i < n1)
        {
            arr[k] = L[i];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2)
        {
            arr[k] = R[j];
            j++;
            k++;
        }
    }

    // Main function that sorts arr[l..r] using
    // merge()
    void sort(int arr[], int l, int r)
    {
        if (l < r)
        {
            // Find the middle point
            int m = (l+r)/2;

            // Sort first and second halves
            sort(arr, l, m);
            sort(arr , m+1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
    }
    int min(int a,int b){
    	if(a>b){
    		return b;
    	}
    	else{
    		return a;
    	}
    }

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Main m = new Main();
		Scanner g = new Scanner(System.in);
		int t = g.nextInt();
		int t1 = g.nextInt();
		int[] kid = new int[t];
		int[] arr = new int[t1];
		int p=0;
		boolean b = false;

		for(int i =0;i<t;i++){
			kid[i] = g.nextInt();
			}

		for(int i =0;i<t1;i++){
			arr[i] = g.nextInt();
			}
		m.sort(arr, 0, arr.length-1);

		for(int i=0;i<t && b == false;i++){
			for(int j=i+1;j<t && b== false;j++){
				if(kid[i]>kid[j] && kid[i] != 0 && kid[j] != 0){
					System.out.println("YES");
					b = true;
					break;
				}

			}
		}

		if(!b){
		for(int k = 0;k<t;k++){
			if(kid[k] != 0 && p<= k && p < t1){
				if(arr[p] <= kid[k]){
					System.out.println("YES");
					b = true;
					break;
				}
			}
			else if (p< t1 && kid[k] == 0 ){
				if(p<t1){
				kid[k]=arr[p];
				p=p+1;
				}
				else if(p == t1-1){
					System.out.println("YES");
					b= true;
					break;
				}
				}
		}
		if(!b){
		System.out.println("NO");
		}
		}
		}
	}

import java.util.Scanner;
//import java.util.Arrays;
public class Solution {
	public static void main(String args[]){
		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int k = s.nextInt();

		int[]org = new int[n];
		int[]sho = new int[k];

		for(int i=0;i<n;i++){
			org[i] = s.nextInt();
		}
		for(int i=0;i<k;i++){
			sho[i] = s.nextInt();
		}
		if(k>=2)
			System.out.println("Yes");
		else{
			for(int i=0;i<n;i++){
				if(org[i]==0){
					org[i]=sho[0];
					if(i+1 < n && org[i+1]<org[i] || i-1>0 && org[i-1]>org[i]){
						System.out.println("Yes");
					}
					else{
						System.out.println("No");
					}
					break;
				}
			}
		}
	}
}

import java.util.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ar {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static int func(int[] a, int[] b){
        if(b[1]>a[1]){
            return 1;
        }else if(b[1]<a[1]){
            return -1;
        }else{
            return a[0]-b[0];
        }
    }

    public static void main(String[] args) throws java.lang.Exception {
        FastReader scn = new FastReader();

int n=scn.nextInt();
int k=scn.nextInt();
int[] arr = new int[n];
int[] ar2=new int[k];
for(int i=0;i<n;i++){
arr[i]=scn.nextInt();
}
for(int i=0;i<k;i++){
ar2[i]=scn.nextInt();
}

if(n==k){
    System.out.println("Yes");
}
else{
Arrays.sort(ar2);
int tmp=0;
for(int i=0;i<n;i++){
    if(arr[i]==0){
        for(int l=tmp;l<k;l++){
            if(i-1>=0 && ar2[l]<arr[i-1]){
                System.out.println("Yes");
                return;
            }
        }
    }
}
System.out.println("No");
}

    }

}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class A {

	public static void main(String[] args) {
		FastScanner scan = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt(), m = scan.nextInt();
		int[] a = scan.nextIntArray(n);
		int[] b = scan.nextIntArray(m);
		if(n == m){
			if(n == 1)out.println("Yes");
			else out.println("No");
			out.close();
			return;
		}
		boolean good = false;
		for(int i = 0; i < n-1; i++) {
			if(a[i] != 0 && a[i+1] != 0 && a[i] > a[i+1]) good = false;
			if(a[i] == 0){
				int k = -1;
				for(int j = 0; j < m; j++) if(a[i+1] != 0 && a[i+1] < b[j] || i > 0 && a[i-1] != 0 && a[i-1] > b[j])k = j;
				if(k != -1) good = true;
			}
		}
		if(a[n-1] == 0){
			int k = -1;
			for(int j = 0; j < m; j++) if(a[n-2] != 0 && a[n-2] > b[j])k = j;
			if(k != -1) good = true;
		}
		out.print(good?"Yes":"No");
		out.close();
	}

	static class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner() {
			try	{
				br = new BufferedReader(new InputStreamReader(System.in));
				st = new StringTokenizer(br.readLine());
			} catch (Exception e){e.printStackTrace();}
		}

		public String next() {
			if (st.hasMoreTokens())	return st.nextToken();
			try {st = new StringTokenizer(br.readLine());}
			catch (Exception e) {e.printStackTrace();}
			return st.nextToken();
		}

		public int nextInt() {return Integer.parseInt(next());}

		public long nextLong() {return Long.parseLong(next());}

		public double nextDouble() {return Double.parseDouble(next());}

		public String nextLine() {
			String line = "";
			if(st.hasMoreTokens()) line = st.nextToken();
			else try {return br.readLine();}catch(IOException e){e.printStackTrace();}
			while(st.hasMoreTokens()) line += " "+st.nextToken();
			return line;
		}

		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for(int i = 0; i < n; i++) a[i] = nextInt();
			return a;
		}

		public long[] nextLongArray(int n){
			long[] a = new long[n];
			for(int i = 0; i < n; i++) a[i] = nextLong();
			return a;
		}

		public double[] nextDoubleArray(int n){
			double[] a = new double[n];
			for(int i = 0; i < n; i++) a[i] = nextDouble();
			return a;
		}

		public char[][] nextGrid(int n, int m){
			char[][] grid = new char[n][m];
			for(int i = 0; i < n; i++) grid[i] = next().toCharArray();
			return grid;
		}
	}

}

import java.io.*;
import java.util.*;

public class Main {

    private static StringBuilder data = new StringBuilder();
    private final static FastReader in = new FastReader();

    public static void main(String[] args) {
       int n=in.inT(),k=in.inT();
       int[]a=new int[n];
       int []b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i]=in.inT();

        }
        for (int i = 0; i < k; i++) {
            b[i]=in.inT();
        }
        Arrays.sort(b);
        int j=k-1;
        for (int i = 0; i < n; i++) {
            if(a[i]==0){
                a[i]=b[j];
                if(i-1>=0){
                    if(a[i]>a[i-1]){
                        System.out.println("No");
                        System.exit(0);
                    }
                }else if(i+1<n){
                    if(a[i]<a[i+1]){
                        System.out.println("No");
                        System.exit(0);
                    }
                }else{
                    if(a[i]<a[i+1]&&a[i]>a[i-1]){
                        System.out.println("No");
                        System.exit(0);
                    }
                }
                j--;
            }else{
                if(i+1<n){
                    if(a[i]<a[i+1]&&a[i+1]!=0){
                        System.out.println("Yes");
                        System.exit(0);
                    }
                }
            }
        }
        System.out.println("Yes");
    }

    static void fileOut(String s) {
        File out = new File("output.txt");
        try {
            FileWriter fw = new FileWriter(out);
            fw.write(s);
            fw.flush();
            fw.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        public FastReader(String path) {
            try {
                br = new BufferedReader(new
                        InputStreamReader(new FileInputStream(path)));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int inT() {
            return Integer.parseInt(next());
        }

        long lonG() {
            return Long.parseLong(next());
        }

        float floaT() {
            return Float.parseFloat(next());
        }

        double doublE() {
            return Double.parseDouble(next());
        }

        String line() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

}

import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class AbandonedSentiment {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int[] a = new int[n];
		int[] b = new int[k];

		for (int i = 0 ; i < a.length; i++) {
			a[i] = scan.nextInt();
		}

		for (int i = 0; i < b.length; i++) {
			b[i] = scan.nextInt();
		}

		Arrays.sort(b);

		if (possible(a, b)) System.out.println("No");
		else System.out.println("Yes");

	}

	/**
	 * Returning false means it can't be ordered
	 * @param a
	 * @param b
	 * @return
	 */
	public static boolean possible(int[] a, int[] b) {
		boolean ordered = true;
		int i = 1;
		int k = b.length - 1;
		if (a[0] == 0) {
			a[0] = b[0];
			k--;
		}
		for (i = i; i < a.length; i++) {
			if (a[i] == 0) {
				if (a[i - 1] > b[k]) {
					return false;
				} else {
					a[i] = b[k--];
				}
			} else if (a[i - 1] > a[i]){
				return false;
			}
		}

		return true;
	}

}

import java.text.ParseException;
import java.util.Scanner;

public class MainA {

	public static void main(String[] args) throws ParseException {
		Scanner in = new Scanner(System.in);
		String[] array = in.nextLine().split(" ");
		int numAll = Integer.parseInt(array[0]);
		int zero = Integer.parseInt(array[1]);
		array = in.nextLine().split(" ");
		String[] zeroArr = in.nextLine().split(" ");
		if(zero != 1)
			System.out.println("YES");
		else {
			int first = Integer.parseInt(array[0]);
			if(first == 0) {
				for(int i=1; i<numAll; i++) {
					if(first > Integer.parseInt(array[i])) {
						System.out.println("YES");
						return;
					}
				}
				System.out.println("NO");
			}else {
				boolean flag = true;
				for(int i=0; i<numAll; i++) {
					int temp = Integer.parseInt(array[i]);
					if(temp == 0) {
						flag = false;
					}
					if( flag && temp > Integer.parseInt(zeroArr[0])) {
						System.out.println("YES");
						return;
					}else if( !flag && temp < Integer.parseInt(zeroArr[0])){
						System.out.println("YES");
						return;
					}
				}
				System.out.println("NO");
			}
		}

		in.close();
	}
}

import java.util.*;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ar {
    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static int func(int[] a, int[] b){
        if(b[1]>a[1]){
            return 1;
        }else if(b[1]<a[1]){
            return -1;
        }else{
            return a[0]-b[0];
        }
    }

    public static void main(String[] args) throws java.lang.Exception {
        FastReader scn = new FastReader();

int n=scn.nextInt();
int k=scn.nextInt();
int[] arr = new int[n];
int[] ar2=new int[k];
for(int i=0;i<n;i++){
arr[i]=scn.nextInt();
}
for(int i=0;i<k;i++){
ar2[i]=scn.nextInt();
}

if(n==k){
    System.out.println("Yes");
}
else{
Arrays.sort(ar2);
int tmp=0;
for(int i=0;i<n;i++){
    if(arr[i]==0){
        for(int l=tmp;l<k;l++){
            if(i-1>=0 && ar2[l]<arr[i-1]||i+1<n && ar2[l]>arr[i+1]){
                System.out.println("Yes");
                return;
            }
            arr[i]=ar2[l];
            tmp++;
            break;
        }
    }
}

for(int i=0;i<n-1;i++){
    if(arr[i+1]<arr[i]){
      System.out.println("Yes");
      return;
    }
}
System.out.println("No");
}

    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Liavontsi Brechka
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static
    @SuppressWarnings("Duplicates")
    class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int a[] = in.nextIntArray(n);
            int min = Integer.MAX_VALUE;
            int max = Integer.MIN_VALUE;
            int next;
            for (int i = 0; i < k; i++) {
                next = in.nextInt();
                min = Math.min(next, min);
                max = Math.max(next, max);
            }

            boolean isPossible = false;
            for (int i = 0; i < n && !isPossible; i++) {
                if (a[i] == 0) {
                    if ((i > 0 && (a[i - 1] > min || a[i - 1] == 0)) ||
                            (i < n - 1 && (a[i + 1] < max || a[i + 1] == 0)))
                        isPossible = true;
                }
            }

            out.print(isPossible ? "Yes" : "No");
        }

    }

    static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextInt();
            }
            return array;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }

    }
}

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Task814A {
    private static ArrayList<Integer> a, b, zeroPositions;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n, k;
        n = in.nextInt();
        k = in.nextInt();
        a = new ArrayList<>(n);
        b = new ArrayList<>(k);
        zeroPositions = new ArrayList<>(n);

        int temp;
        for (int i = 0; i < n; ++i) {
            temp = in.nextInt();
            a.add(temp);
            if (temp == 0) {
                zeroPositions.add(i);
            }
        }
        for (int i = 0; i < k; ++i) b.add(in.nextInt());

        if (zeroPositions.size() < k) {
            out.println("No");
        } else if (zeroPositions.size() > 1
                || zeroPositions.size() == 0) {
            out.println("Yes");
        } else {
            /*
            * case when count of zero is 1
            * */
            int pos = zeroPositions.get(0);
            if (!checkSequence(pos + 1) || checkSequence(pos - 1)) {
                out.println("Yes");
            } else {
                out.println("No");
            }
        }
        out.flush();
    }

    private static boolean checkSequence(int pos) {
        try {
            return a.get(pos) > b.get(zeroPositions.size() - 1) || a.get(pos) > b.get(0);
        } catch (IndexOutOfBoundsException e) {
            return true;
        }
    }
}

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class _418 {

	public static void main(String[] args) {

		Scanner input = new Scanner(System.in);

		int aSize, bSize;
		aSize = input.nextInt();
		bSize = input.nextInt();
		ArrayList<Integer> a = new ArrayList<Integer>(aSize);
		ArrayList<Integer> b = new ArrayList<Integer>(bSize);

		for(int i = 0 ; i < aSize ; i++)
			a.add(input.nextInt());

		for(int i = 0; i < bSize ; i++)
			b.add(input.nextInt());

		Collections.sort(b, Collections.reverseOrder());

		boolean isValid = false;

		for(int i = 0; i < aSize ; i++){
			if(a.get(i) > a.get(i+1) && i != (aSize - 1)){
				isValid = true;
				break;
			}
			if(a.get(i) == 0){

				for(int j = 0 ; j < bSize ; j++){

					if(i != 0){
						if(b.get(j) < a.get(i-1)){
							isValid = true;
							break;
						}
					}
					if(i != (aSize - 1)){
						if(b.get(j) > a.get(i+1)){
							isValid = true;
							break;
						}
					}
				}
			}

			if(isValid) break;
		}

		if(isValid)
			System.out.println("Yes");
		else
			System.out.println("No");
	}

}

import java.util.*;
public class past
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[k];
		int f=0,c=0,p=0,max=0,q=k-1,z=0;
		for(int i=0;i<n;i++)
		{

			a[i]=sc.nextInt();
		}
		for(int i=0;i<k;i++)
		{

			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		max=a[0];
		for(int i=1;i<n;i++)
		{

			if(a[i]==0)
			{
				if(b[q]<a[i-1]||b[q]>a[i+1])
				{
					z++;
					break;
				}
				q--;
			}

		}
		if(z>0)
		{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
	}
}

import java.util.Scanner;

/**
 * Created by yuu on 2/7/17.
 */
public class Problem814A {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int[] first = new int[n];
        int second = 0;
        if (k > 1) System.out.println("Yes");
        else {
            int zero = 0;
            for (int i = 0; i < n; i++) {
                first[i] = sc.nextInt();
                if (first[i] == 0) zero = i;
            }
            second = sc.nextInt();
            if ((zero != 0 && first[zero-1] > second)
                    || zero != n-1 && first[zero+1] < second)
                System.out.println("Yes");
            else System.out.println("No");
        }
    }
}

import java.text.ParseException;
import java.util.Scanner;

public class MainA {

	public static void main(String[] args) throws ParseException {
		Scanner in = new Scanner(System.in);
		String[] array = in.nextLine().split(" ");
		int zero = Integer.parseInt(array[1]);
		array = in.nextLine().split(" ");
		String[] zeroArr = in.nextLine().split(" ");
		if(zero != 1)
			System.out.println("YES");
		else {
			boolean flag = true;
			for(int i=0; i<array.length; i++) {
				int temp = Integer.parseInt(array[i]);
				if(temp == 0)
					flag = false;
				if( flag && temp > Integer.parseInt(zeroArr[0])) {
					System.out.println("YES");
					in.close();
					return;
				}
			}
			System.out.println("NO");
		}

		in.close();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author and_so_on
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int index = -1;
            int prev = -1, next = 250;
            if (k > 1) {
                out.println("Yes");
                return;
            } else {
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) {
                    arr[i] = in.nextInt();
                    if (arr[i] == 0) {
                        index = i;
                    }
                }
                int num = in.nextInt();
                if (index != 0) {
                    prev = arr[index - 1];
                }
                if (index != n - 1) {
                    next = arr[index + 1];
                }
                if (num <= prev && num >= next) {
                    out.println("Yes");
                } else {
                    out.println("No");
                }
            }
        }

    }
}

import java.util.*;

public class ProblemA
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    int n=sc.nextInt();
    int k=sc.nextInt();
    int A[]=new int[n];
    int B[]=new int[k];
    int i,j;

    for(i=0;i<n;i++)
      A[i]=sc.nextInt();
    for(i=0;i<k;i++)
      B[i]=sc.nextInt();
    Arrays.sort(B);
    j=k-1;
    for(i=0;i<n;i++)
    {
      if(A[i]==0)
      {
        A[i]=B[j--];
      }
    }
    for(i=0;i<n-1;i++)
    {
      if(A[i]>=A[i+1])
      {
          System.out.println("Yes");
        break;
      }
    }
    System.out.println("No");

  }
}

import java.util.Scanner;

public class AnabondonedSentimentFromPast {

	public static void main(String[] args) {
		// TODO Auto-generated method stub

		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int k = input.nextInt();
		int[] arr = new int[n];
		int[] brr = new int[k];
		for(int i=0; i<n;i++)arr[i] = input.nextInt();
		for(int i=0; i<k;i++)brr[i] = input.nextInt();
		if(k>=2){
			System.out.println("Yes");
			return;
		}

		int index = -1;
		int i=0;
		while(i<n){
			if(arr[i]==0){
				index = i;
				break;
			}
			i++;

		}
		 i=0;
		while(i+1<index){
			if(arr[i+1]<arr[i]){
				System.out.println("Yes");
			   return;
			}
			i++;
		}
		if(index+1 <n && arr[index-1]>arr[index+1]){
			System.out.println("Yes");
			return;
		}
		i = index+1;
		while(i+1<n){
			if(arr[i+1]<arr[i]){
				System.out.println("Yes");
				return;
			}
			i++;
		}
		if(index+1<n && (brr[0]<arr[index-1] || brr[0]>arr[index+1])){
			System.out.println("Yes");
			return;
		}
		System.out.println("No");

	}

}

import java.util.*;
public class past
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int k=sc.nextInt();
		int a[]=new int[n];
		int b[]=new int[k];
		int f=0,c=0,p=0,max=0,q=k-1,z=0;
		for(int i=0;i<n;i++)
		{

			a[i]=sc.nextInt();
		}
		for(int i=0;i<k;i++)
		{

			b[i]=sc.nextInt();
		}
		Arrays.sort(b);
		max=a[0];
		for(int i=0;i<n;i++)
		{

			if(a[i]==0)
			{
				if(i==0)
				{
					if(b[q]>a[i+1])
				{
					z++;
					break;
				}
				}
				else
				if(i==n-1)
				{
					if(b[q]<a[i-1])
				{
					z++;
					break;
				}
				}
				else
				if(b[q]<a[i-1]||b[q]>a[i+1])
				{
					z++;
					break;
				}
				q--;
			}

		}
		if(z>0)
		{
			System.out.println("Yes");
		}
		else
		{
			System.out.println("No");
		}
	}
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class CF814A {
	public static void main(String[] args) {
		FastReader fr = new FastReader();
		int n = fr.nextInt();
		int k = fr.nextInt();
		int[] a = new int[n];
		int[] b = new int[k];
		boolean a_in = true;
		int prev = 0;
		for(int i=0;i<n;i++)
		{
			a[i] = fr.nextInt();
			if(a[i]!=0&&a[i]>prev)
			{
				prev = a[i];
			}
			else if(a[i]!=0&&a[i]<prev)
			{
				a_in = false;
			}
		}
		for(int j=0;j<k;j++)
			b[j] = fr.nextInt();
		if(!a_in||n==1)
		{
			System.out.println("Yes");
			return;
		}
		if(k==1)
		{
			System.out.println("No");
			return;
		}
		System.out.println("Yes");
	}

	//Better IO Class
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public Double nextDouble() {
			return Double.parseDouble(next());
		}

		public Float nextFloat() {
			return Float.parseFloat(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				System.out.println(e);
			}
			return str;
		}
	}
}

/*
 * DA-IICT
 * Author: Jugal Kalal
 */
import java.util.*;
import java.io.*;
import java.math.*;
public class Fuck{
//	static long MOD=(long)Math.pow(10,9)+7;
	static final int lint=Integer.MAX_VALUE;
	static final double ldouble=Double.MAX_VALUE;
	public static void main(String args[]) {
        new Thread(null, new Runnable() {
            public void run() {
                try{
                    solve();
                    w.close();
                }
                catch(Exception e){
                    e.printStackTrace();
                }
            }
        }, "1", 1 << 26).start();
	}
	static InputReader in;
    static PrintWriter w;
    static void solve(){
        in = new InputReader(System.in);
        w = new PrintWriter(System.out);
        int n=in.nextInt();
        int m=in.nextInt();
        int a[]=new int[n];
        ArrayList<Integer> b=new ArrayList<Integer>();
        for(int i=0;i<n;i++){
        	a[i]=in.nextInt();
        }
        for(int i=0;i<m;i++){
        	b.add(in.nextInt());
        }
        Collections.sort(b,Collections.reverseOrder());
        ArrayList<Integer> temp=new ArrayList<Integer>();
        ArrayList<Integer> sort=new ArrayList<Integer>();
        int j=0;
        for(int i=0;i<n;i++){
        	if(a[i]==0){
        		a[i]=b.get(j);
        		j++;
        	}
        	temp.add(a[i]);
        	sort.add(a[i]);
        }
        Collections.sort(sort);
        for(int i=0;i<n;i++){
        	if(temp.get(i)!=sort.get(i)){
        		w.println("Yes");
        		return;
        	}
        }
        w.println("No");
    }
    static boolean visited[];
    static ArrayList<Integer> adj[]; //Adjacency Lists
    static int V;   // No. of vertices
    // Constructor
    static void Graph(int v){
        V = v;
        visited=new boolean[v];
        adj = new ArrayList[v];
        for (int i=0; i<v; ++i){
        	adj[i] = new ArrayList();
        }
    }
    // Function to add an edge into the graph
    static void addEdge(int v,int w){
		adj[v].add(w);
		adj[w].add(v);
    }
    static void bfs(int s,int n){
    	LinkedList<Integer> queue=new LinkedList<Integer>();
    	LinkedList<Integer> lev=new LinkedList<Integer>();
    	lev.add(0);
    	queue.add(s);
    	visited[s]=true;
    	while(!queue.isEmpty()){
    		int num=queue.pop();
    		int l=lev.pop();
    		for(int i=0;i<adj[num].size();i++){
    			if(!visited[adj[num].get(i)]){
    				visited[adj[num].get(i)]=true;
    				queue.add(adj[num].get(i));
    				lev.add(l+1);
    			}
    		}
    	}

    }
    class Comp implements Comparator<ArrayList<Integer>>{
        @Override
        public int compare(ArrayList<Integer> arr1,ArrayList<Integer> arr2){
        	int min=Integer.min(arr1.size(), arr2.size());
            for(int i=0;i<min;i++){
            	if(arr1.get(i)>arr2.get(i)){
            		return 1;
            	}
            	if(arr1.get(i)<arr2.get(i)){
            		return -1;
            	}
            }
            if(arr1.size()>arr2.size()){
            	return 1;
            }
            if(arr1.size()<arr2.size()){
            	return -1;
            }
            return 0;
        }
    }
    static long power(long base, long exponent, long modulus){
	    long result = 1L;
	    while (exponent > 0) {
	        if (exponent % 2L == 1L)
	            result = (result * base) % modulus;
	        exponent = exponent >> 1;
	        base = (base * base) % modulus;
	    }
	    return result;
	}
    static HashMap<Long,Long> primeFactors(long n){
        HashMap<Long,Long> ans=new HashMap<Long,Long>();
    	// Print the number of 2s that divide n
        while (n%2L==0L)
        {
            if(ans.containsKey(2L)){
            	ans.put(2L,ans.get(2L)+1L);
            }else{
            	ans.put(2L,1L);
            }
            n /= 2L;
        }

        // n must be odd at this point.  So we can
        // skip one element (Note i = i +2)
        for (long i = 3; i <= Math.sqrt(n); i+= 2L)
        {
            // While i divides n, print i and divide n
            while (n%i == 0)
            {
            	if(ans.containsKey(i)){
                	ans.put(i,ans.get(i)+1L);
                }else{
                	ans.put(i,1L);
                }
                n /= i;
            }
        }

        // This condition is to handle the case whien
        // n is a prime number greater than 2
        if (n > 2)
            ans.put(n,1L);
        return ans;
    }
//	static long gcd(long a,long b){
//		if(a==0){
//			return b;
//		}
//		return gcd(b%a,a);
//	}
	static boolean isPrime[];
////for marking all prime numbers greater than 1 and less than equal to N
	static void sieve(int N) {
	 isPrime=new boolean[N+1];
	 isPrime[0] = true;
	 isPrime[1] = true;
	 for(int i = 2; i * i <= N; ++i) {
	      if(isPrime[i] == false) {//Mark all the multiples of i as composite numbers
	          for(int j = i * i; j <= N ;j += i)
	              isPrime[j] = true;
	     }
	 }
	}
//  //if  str2 (pattern) is subsequence of str1 (Text) or not
//	static boolean function(String str1,String str2){
//	     str2 = str2.replace("", ".*");  //returns .*a.*n.*n.*a.
//	     return (str1.matches(str2));  // returns true
//	}
    static int Arr[];
    static long size[];
  //modified initialize function:
    static void initialize(int N){
    	Arr=new int[N];
    	size=new long[N];
        for(int i = 0;i<N;i++){
        	Arr[ i ] = i ;
        	size[ i ] = 1;
        }
    }
    static boolean find(int A,int B){
        if( root(A)==root(B) )       //if A and B have same root,means they are connected.
        return true;
        else
        return false;
    }
 // modified root function.
    static void weighted_union(int A,int B,int n){
        int root_A = root(A);
        int root_B = root(B);
        if(size[root_A] < size[root_B ]){
        	Arr[ root_A ] = Arr[root_B];
        	size[root_B] += size[root_A];
        }
        else{
        	Arr[ root_B ] = Arr[root_A];
        	size[root_A] += size[root_B];
        }
    }
    static int root (int i){
        while(Arr[ i ] != i){
            Arr[ i ] = Arr[ Arr[ i ] ] ;
            i = Arr[ i ];
        }
        return i;
    }

	static boolean isPrime(long n) {
		if(n < 2L) return false;
		if(n == 2L || n == 3L) return true;
		if(n%2L == 0 || n%3L == 0) return false;
		long sqrtN = (long)Math.sqrt(n)+1L;
		for(long i = 6L; i <= sqrtN; i += 6L) {
			if(n%(i-1) == 0 || n%(i+1) == 0) return false;
		}
		return true;
	}
//	static boolean T[][][];
//	static void subsetSum(int input[], int total, int count) {
//        T = new boolean[input.length + 1][total + 1][count+1];
//        for (int i = 0; i <= input.length; i++) {
//        	T[i][0][0] = true;
//        	for(int j = 1; j<=count; j++){
//        		T[i][0][j] = false;
//        	}
//        }
//        int sum[]=new int[input.length+1];
//        for(int i=1;i<=input.length;i++){
//            sum[i]=sum[i-1]+input[i-1];
//        }
//        for (int i = 1; i <= input.length; i++) {
//            for (int j = 1; j <= (int)Math.min(total,sum[i]); j++) {
//            	for (int k = 1; k <= (int)Math.min(i,count); k++){
//            		 if (j >= input[i - 1]) {//Exclude and Include
//                         T[i][j][k] = T[i - 1][j][k] || T[i - 1][j - input[i - 1]][k-1];
//                     } else {
//                         T[i][j][k] = T[i-1][j][k];
//                     }
//            	}
//            }
//        }
//    }
//	static <K,V extends Comparable<? super V>>
//	SortedSet<Map.Entry<K,V>> entriesSortedByValues(Map<K,V> map) {
//	    SortedSet<Map.Entry<K,V>> sortedEntries = new TreeSet<Map.Entry<K,V>>(
//	        new Comparator<Map.Entry<K,V>>() {
//	            @Override public int compare(Map.Entry<K,V> e1, Map.Entry<K,V> e2) {
//	                int res = e2.getValue().compareTo(e1.getValue());
//	                return res != 0 ? res : 1;
//	            }
//	        }
//	    );
//	    sortedEntries.addAll(map.entrySet());
//	    return sortedEntries;
//	}

	//minimum prime factor of all the numbers less than n
    static int minPrime[];
	static void minimumPrime(int n){
		minPrime=new int[n+1];
		minPrime[1]=1;
        for (int i = 2; i * i <= n; ++i) {
            if (minPrime[i] == 0) {         //If i is prime
                for (int j = i * i; j <= n; j += i) {
                    if (minPrime[j] == 0) {
                        minPrime[j] = i;
                    }
                }
            }
        }
        for (int i = 2; i <= n; ++i) {
            if (minPrime[i] == 0) {
                minPrime[i] = i;
            }
        }
	}
	static long modInverse(long A, long M)
	{
		long x=extendedEuclid(A,M)[0];
		return (x%M+M)%M;    //x may be negative
	}
	static long[] extendedEuclid(long A, long B) {
		if(B == 0) {
			long d = A;
			long x = 1;
			long y = 0;
			return new long[]{x,y,d};
		}
		else {
			long arr[]=extendedEuclid(B, A%B);
			long temp = arr[0];
			arr[0] = arr[1];
			arr[1] = temp - (A/B)*arr[1];
			return arr;
		}
	}

	static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, numChars;
        private SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public String nextLine() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public int[] nextIntArray(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextInt();
            }
            return arr;
        }

        public long[] nextLongArray(int n) {
            long[] arr = new long[n];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLong();
            }
            return arr;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
	}
}
//class Pair {
//	int x,y,z;
//
//    Pair(int x,int y,int z){
//        this.x=x;
//        this.y=y;
//        this.z=z;
//    }
//	public int hashCode() {
//		final int prime = 31;
//		int result = 1;
//		result = prime * result + x;
//		result = prime * result + y;
//		result = prime * result + z;
//		return result;
//	}
//
//	public boolean equals(Object obj) {
//		if (this == obj)
//			return true;
//		if (obj == null)
//			return false;
//		if (getClass() != obj.getClass())
//			return false;
//		Pair other = (Pair) obj;
//		if (x != other.x)
//			return false;
//		if (y != other.y)
//			return false;
//		if (z != other.z)
//			return false;
//		return true;
//	}
//}

import java.text.ParseException;
import java.util.Scanner;

public class MainA {

	public static void main(String[] args) throws ParseException {
		Scanner in = new Scanner(System.in);
		String[] array = in.nextLine().split(" ");
		int numAll = Integer.parseInt(array[0]);
		int zero = Integer.parseInt(array[1]);
		array = in.nextLine().split(" ");
		String[] zeroArr = in.nextLine().split(" ");
		if(zero != 1)
			System.out.println("YES");
		else {
			int first = Integer.parseInt(array[0]);
			if(first == 0) {
				for(int i=1; i<numAll; i++) {
					if(first > Integer.parseInt(array[i])) {
						System.out.println("YES");
						return;
					}
				}
				System.out.println("NO");
			}else {
				boolean flag = true;
				for(int i=0; i<numAll; i++) {
					int temp = Integer.parseInt(array[i]);
					if(temp == 0) {
						flag = false;
						continue;
					}
					if( flag && temp > Integer.parseInt(zeroArr[0])) {
						System.out.println("YES");
						return;
					}else if( !flag && temp < Integer.parseInt(zeroArr[0])){
						System.out.println("YES");
						return;
					}
				}
				System.out.println("NO");
			}
		}

		in.close();
	}
}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Iterator;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.NoSuchElementException;
import java.io.InputStream;
/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        String YES = "Yes";
        String NO = "No";

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int k = in.readInt();
            int[] a = IOUtils.readIntArray(in, n);
            int[] bb = IOUtils.readIntArray(in, k);
            int aZeros = ArrayUtils.count(a, 0);
            if (aZeros != 1) {
                out.printLine(YES);
                return;
            }
            int aZeroIndex = ArrayUtils.find(a, 0);
            int before = ((aZeroIndex == 0) ? -1 : a[aZeroIndex - 1]);
            int after = ((aZeroIndex == n - 1) ? 10000000 : a[aZeroIndex + 1]);
            for (int b : bb) {
                if (b == before || b == after) throw new RuntimeException();
                if (b > before && b < after) continue;
                out.printLine(YES);
                return;
            }
            out.printLine(NO);
        }
    }
    static interface IntCollection extends IntStream {
        public int size();
    }
    static interface IntReversableCollection extends IntCollection {
    }
    static interface IntIterator {
        public int value() throws NoSuchElementException;
        public boolean advance();
        public boolean isValid();
    }
    static interface IntStream extends Iterable<Integer>, Comparable<IntStream> {
        public IntIterator intIterator();
        default public Iterator<Integer> iterator() {
            return new Iterator<Integer>() {
                private IntIterator it = intIterator();

                public boolean hasNext() {
                    return it.isValid();
                }

                public Integer next() {
                    int result = it.value();
                    it.advance();
                    return result;
                }
            };
        }
        default public int compareTo(IntStream c) {
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                int i = it.value();
                int j = jt.value();
                if (i < j) {
                    return -1;
                } else if (i > j) {
                    return 1;
                }
                it.advance();
                jt.advance();
            }
            if (it.isValid()) {
                return 1;
            }
            if (jt.isValid()) {
                return -1;
            }
            return 0;
        }
        default public int count(int value) {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (it.value() == value) {
                    result++;
                }
            }
            return result;
        }
    }
    static class IOUtils {
        public static int[] readIntArray(InputReader in, int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; i++) {
                array[i] = in.readInt();
            }
            return array;
        }
    }
    static class IntArray extends IntAbstractStream implements IntList {
        private int[] data;

        public IntArray(int[] arr) {
            data = arr;
        }

        public int size() {
            return data.length;
        }

        public int get(int at) {
            return data[at];
        }

        public void removeAt(int index) {
            throw new UnsupportedOperationException();
        }
    }
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }
    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }
    }
    static interface IntList extends IntReversableCollection {
        public abstract int get(int index);
        public abstract void removeAt(int index);
        default public IntIterator intIterator() {
            return new IntIterator() {
                private int at;
                private boolean removed;

                public int value() {
                    if (removed) {
                        throw new IllegalStateException();
                    }
                    return get(at);
                }

                public boolean advance() {
                    at++;
                    removed = false;
                    return isValid();
                }

                public boolean isValid() {
                    return !removed && at < size();
                }

                public void remove() {
                    removeAt(at);
                    at--;
                    removed = true;
                }
            };
        }
        default public int find(int value) {
            int size = size();
            for (int i = 0; i < size; i++) {
                if (get(i) == value) {
                    return i;
                }
            }
            return -1;
        }
    }
    static class ArrayUtils {
        public static int count(int[] array, int value) {
            return new IntArray(array).count(value);
        }

        public static int find(int[] array, int value) {
            return new IntArray(array).find(value);
        }
    }
    static abstract class IntAbstractStream implements IntStream {
        public String toString() {
            StringBuilder builder = new StringBuilder();
            boolean first = true;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                if (first) {
                    first = false;
                } else {
                    builder.append(' ');
                }
                builder.append(it.value());
            }
            return builder.toString();
        }

        public boolean equals(Object o) {
            if (!(o instanceof IntStream)) {
                return false;
            }
            IntStream c = (IntStream) o;
            IntIterator it = intIterator();
            IntIterator jt = c.intIterator();
            while (it.isValid() && jt.isValid()) {
                if (it.value() != jt.value()) {
                    return false;
                }
                it.advance();
                jt.advance();
            }
            return !it.isValid() && !jt.isValid();
        }

        public int hashCode() {
            int result = 0;
            for (IntIterator it = intIterator(); it.isValid(); it.advance()) {
                result *= 31;
                result += it.value();
            }
            return result;
        }
    }
}

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

public class CF814A {
	static class Node
	{
		int val;
		Node(int v){this.val=v;}
	}
	public static void main(String[] args) {
		FastReader fr = new FastReader();
		int n = fr.nextInt();
		int k = fr.nextInt();
		ArrayList<Node> a = new ArrayList<Node>();
		ArrayList<Node> b = new ArrayList<Node>();
		for(int i=0;i<n;i++)
			a.add(new Node(fr.nextInt()));
		for(int i=0;i<k;i++)
			b.add(new Node(fr.nextInt()));
		b.sort((Node n1, Node n2)->n2.val-n1.val);
		int j = 0;
		int i = 0;
		int prev = 0;
		while(i<n&&j<k)
		{
			if(a.get(i).val!=0)
			{
				if(a.get(i).val>prev)
				{
					prev = a.get(i).val;
					i++;
				}
				else
				{
					System.out.println("Yes");
					return;
				}
			}
			else
			{
				if(b.get(j).val>prev)
				{
					prev = b.get(j).val;
					j++;
				}
				else
				{
					System.out.println("Yes");
					return;
				}
			}
		}
		System.out.println("No");
		//for(int i=0;i<b.size();i++)
		//	System.out.println(b.get(i).val);
	}

	//Better IO Class
	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreElements()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
			return st.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public Double nextDouble() {
			return Double.parseDouble(next());
		}

		public Float nextFloat() {
			return Float.parseFloat(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				System.out.println(e);
			}
			return str;
		}
	}
}

import java.text.ParseException;
import java.util.Scanner;

public class MainA {

	public static void main(String[] args) throws ParseException {
		Scanner in = new Scanner(System.in);
		String[] array = in.nextLine().split(" ");
		int numAll = Integer.parseInt(array[0]);
		int zero = Integer.parseInt(array[1]);
		array = in.nextLine().split(" ");
		String[] zeroArr = in.nextLine().split(" ");
		if(zero != 1)
			System.out.println("YES");
		else {
//			boolean flag = true;
//			for(int i=0; i<numAll; i++) {
//				int temp = Integer.parseInt(array[i]);
//				if(temp == 0) {
//					flag = false;
//					continue;
//				}
//				if( flag && temp > Integer.parseInt(zeroArr[0])) {
//					System.out.println("YES");
//					return;
//				}else if( !flag && temp < Integer.parseInt(zeroArr[0])){
//					System.out.println("YES");
//					return;
//				}
//			}
//			System.out.println("NO");
			int zeroNum = Integer.parseInt(zeroArr[0]);
			for(int i=0; i<numAll-1; i++) {
				int temp = Integer.parseInt(array[i]);
				int temp1 = Integer.parseInt(array[i+1]);
				if(temp != 0 && temp1 != 0 && temp > temp1) {
					System.out.println("YES");
					System.out.println(1);
					return;
				}else if(temp == 0) {
					array[i] = zeroArr[0];
					if(zeroNum > temp1) {
						System.out.println("YES");
						System.out.println(2);
						return;
					}
				}else if(temp1 == 0) {
					array[i+1] = zeroArr[0];
					if(temp > zeroNum) {
						System.out.println("YES");
						System.out.println(3);
						return;
					}
				}
			}
			System.out.println("NO");
		}
		in.close();
	}
}

import java.util.Arrays;
import java.util.Scanner;

public class A {

	public static void main(String[] args) {
		new A();
	}

	int a[],aLen,b[],bLen;

	A() {

		Scanner in = new Scanner(System.in);

		aLen = in.nextInt();
		bLen = in.nextInt();
		a = new int[aLen];
		b = new int[bLen];

		for(int i=0;i<aLen;i++){
			a[i] = in.nextInt();
		}

		for(int i=0;i<bLen;i++){
			b[i] = in.nextInt();
		}

		if(bLen>1){
			System.out.println("Yes");
			System.exit(0);
		}else if(bLen==1){
			Arrays.sort(b);
			for(int i=0;i<aLen;i++){
				if(a[i]!=0)
					continue;
				if((i>0 && b[0]<=a[i-1]) || (i<aLen-1 && b[bLen-1]>=a[i+1])){
					System.out.println("Yes");
					System.exit(0);
				}
			}
			System.out.println("No");
			System.exit(0);
		}

		in.close();

	}

}

/*

4 2
11 0 0 14
5 4

6 1
2 3 0 8 9 10
5

4 1
8 94 0 4
89

7 7
0 0 0 0 0 0 0
1 2 3 4 5 6 7

5 1
0 5 8 6 12
4

6 5
0 0 0 0 0 5
1 8 6 5 7

 */

import java.util.Scanner;

public class Main {
    private boolean setiment(int[] a, int[] b, int n, int k) {
        if (k <= 1) {
            if (a[n - 1] > 0) {
                for (int i = 0; i < n - 1; i++) {
                    if (a[i] == 0) {
                        a[i] = b[0];
                        if (a[i + 1] < a[i]) return true;
                    }
                }
            }
        }
        return false;
    }

    public static void main(String[] args) {
        Scanner sn = new Scanner(System.in);
        int n = sn.nextInt();
        int k = sn.nextInt();
        int[] a = new int[n];
        int[] b = new int[k];
        for (int i = 0; i < n; i++) {
            a[i] = sn.nextInt();
        }
        for (int i = 0; i < k; i++) {
            b[i] = sn.nextInt();
        }
        Main main = new Main();
        boolean check = main.setiment(a, b, n, k);
        if (k > 1 ||
                check) {
            System.out.println("Yes");
        } else {
            System.out.println("No");

        }
    }

}

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author and_so_on
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int index = -1;
            int prev = -1, next = 250;
            if (k > 1) {
                out.println("Yes");
                return;
            } else {
                int[] arr = new int[n];
                for (int i = 0; i < n; i++) {
                    arr[i] = in.nextInt();
                    if (arr[i] == 0) {
                        index = i;
                    }
                }
                int num = in.nextInt();
                if (index != 0) {
                    prev = arr[index - 1];
                }
                if (index != n - 1) {
                    next = arr[index + 1];
                }
                if (num > prev && num < next) {
                    out.println("No");
                } else {
                    out.println("Yes");
                }
            }
        }

    }
}

import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Task814A {
    private static ArrayList<Integer> a, b, zeroPositions;
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n, k;
        n = in.nextInt();
        k = in.nextInt();
        a = new ArrayList<>(n);
        b = new ArrayList<>(k);
        zeroPositions = new ArrayList<>(n);

        int temp;
        for (int i = 0; i < n; ++i) {
            temp = in.nextInt();
            a.add(temp);
            if (temp == 0) {
                zeroPositions.add(i);
            }
        }
        for (int i = 0; i < k; ++i) b.add(in.nextInt());

        if (zeroPositions.size() < k) {
            out.println("No");
        } else if (zeroPositions.size() > 1
                || zeroPositions.size() == 0) {
            out.println("Yes");
        } else {
            /*
            * case when count of zero is 1
            * */
            int pos = zeroPositions.get(0);
            a.set(pos, b.get(0));
            ArrayList<Integer> tempA = new ArrayList<>(a);
            Collections.sort(tempA);

            if (!Arrays.equals(tempA.toArray(), a.toArray())) {
                out.println("Yes l");
            } else {
                out.println("No");
            }
        }
        out.flush();
    }
}

import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.util.*;

public  class FibinacciSeries
{

	   static class FastReader
	    {
	        BufferedReader br;
	        StringTokenizer st;

	        public FastReader()
	        {
	            br = new BufferedReader(new
	                     InputStreamReader(System.in));
	        }

	        String next()
	        {
	            while (st == null || !st.hasMoreTokens())
	            {
	                try
	                {
	                    st = new StringTokenizer(br.readLine());
	                }
	                catch (IOException  e)
	                {
	                    e.printStackTrace();
	                }
	            }
	            return st.nextToken();

	        }

	        int nextInt()
	        {
	            return Integer.parseInt(next());
	        }

	        long nextLong()
	        {
	            return Long.parseLong(next());
	        }

	        double nextDouble()
	        {
	            return Double.parseDouble(next());
	        }

	        String nextLine()
	        {
	            String str = "";
	            try
	            {
	                str = br.readLine();
	            }
	            catch (IOException e)
	            {
	                e.printStackTrace();
	            }
	            return str;
	        }

			public Character charAt(int i) {
				// TODO Auto-generated method stub
				return null;
			}
	    }

	  // Complete the hurdleRace function below.
//    public static void solve() {
//    	FastReader s=new FastReader();

    public static void main(String[] args) throws IOException {
    	FastReader s=new FastReader();

    	int na = s.nextInt();
    	int nb = s.nextInt();
    	int[] a =  new int[na];
    	int[] b = new int[nb];
    	int pos = 0,flag=0;
    	for(int i=0;i<na && flag==0;i++) {
    		a[i] = s.nextInt();
    		if(a[i]==0) {
    			pos=i-1;
    			flag=1;
    		}
    	}

    	int max=0;
    	for(int i=0;i<nb;i++) {
    		b[i] = s.nextInt();
    		max = Math.max(max, b[i]);
    	}
    	if(pos<=0) {
    		if(a[pos+1]!=0 && a[pos+1]>max)System.out.println("NO");
    		else System.out.println("YES");
    	}
    	else {
    		if(a[pos]<max)System.out.println("NO");
    		else System.out.println("YES");
    	}

    }
}

import java.util.Scanner;
import java.util.Vector;
public class I9 {
    public static void main(String[] args) {
        int ar[] = new int[10];
        for(int i=0; i<10; i++)ar[i]=0;
        Vector v = new Vector();
        int l,r,ln,rsl=0;
        Scanner Input = new Scanner(System.in);
        l = Input.nextInt();
        r = Input.nextInt();
        while(l!=0){
            v.addElement(l%10);
            l /= 10;
        }
        ln = v.size();
        for(int i=ln-1; i>=0; i--){
           int dgt;
           dgt = (int) v.elementAt(i);
           if(ar[dgt]==0){
                rsl = (rsl*10)+dgt;
                ar[dgt] = 1;
           } else if(ar[dgt]==1){
                while(ar[dgt]==1){
                    if(dgt<9) dgt++;
                    if(dgt==9) break;
                }
                 if(ar[dgt]==0){
                    rsl = (rsl*10)+dgt;
                    ar[dgt] = 1;
                }else if(ar[dgt]==1){
                    rsl=0;
                    for(i=1; i<=ln+1; i++)
                        rsl = (rsl*10) + i;
                    break;
                }
            }
        }
        if(rsl<=r)System.out.println(rsl);
        else System.out.println(-1);
    }
}

/*
ID: mchensd
LANG: JAVA
PROG: http://codeforces.com/problemset/problem/814/A
 */

/**
 *
 * @author Michael
 */

import java.util.*;
import java.io.*;

public class AbandonedSettlement {
    public void run(BufferedReader br, PrintWriter pw) throws IOException {
        StringTokenizer st;
        st = new StringTokenizer(br.readLine());

        int n = Integer.parseInt(st.nextToken());
        int k = Integer.parseInt(st.nextToken());
        if (k > 1) {
            pw.println("Yes");
            return;
        }

        st = new StringTokenizer(br.readLine());
        int[] seq = new int[n];
        for (int i=0; i<n; ++i) {
            seq[i] = Integer.parseInt(st.nextToken());
        }

        int t = Integer.parseInt(br.readLine());
        boolean ans = true;
        for (int i=0; i<n; ++i) {
            if (seq[i] == 0) {
                if (i == 0) ans = seq[i+1] <= t;
                else if (i == n-1) ans = seq[i-1] >= t;
                else ans = seq[i+1] <= t || seq[i-1] >= t;
            }
        }
        if (ans) pw.println("Yes");
        else pw.println("No");

    }
    public static void main(String[] args) throws IOException {
//        new AbandonedSettlement().runFileIO("AbandonedSettlement");
        new AbandonedSettlement().runStdIO();

    }

    public void runFileIO(String filename) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader(filename + ".in"));
        PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(filename + ".out")));
        run(br, pw);
        pw.close();
    }

    public void runStdIO() throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        run(br, pw);
        pw.close();
    }
}