Problem: Overlooking the captivating blend of myriads of vernal hues, Arkady the painter lays out a long, long canvas.

Arkady has a sufficiently large amount of paint of three colours: cyan, magenta, and yellow. On the one-dimensional canvas split into n consecutive segments, each segment needs to be painted in one of the colours.

Arkady has already painted some (possibly none or all) segments and passes the paintbrush to you. You are to determine whether there are at least two ways of colouring all the unpainted segments so that no two adjacent segments are of the same colour. Two ways are considered different if and only if a segment is painted in different colours in them.

Input

The first line contains a single positive integer n (1 ≤ n ≤ 100) — the length of the canvas.

The second line contains a string s of n characters, the i-th of which is either 'C' (denoting a segment painted in cyan), 'M' (denoting one painted in magenta), 'Y' (one painted in yellow), or '?' (an unpainted one).

Output

If there are at least two different ways of painting, output "Yes"; otherwise output "No" (both without quotes).

You can print each character in any case (upper or lower).

Examples

Input

5
CY??Y


Output

Yes


Input

5
C?C?Y


Output

Yes


Input

5
?CYC?


Output

Yes


Input

5
C??MM


Output

No


Input

3
MMY


Output

No

Note

For the first example, there are exactly two different ways of colouring: CYCMY and CYMCY.

For the second example, there are also exactly two different ways of colouring: CMCMY and CYCMY.

For the third example, there are four ways of colouring: MCYCM, MCYCY, YCYCM, and YCYCY.

For the fourth example, no matter how the unpainted segments are coloured, the existing magenta segments will prevent the painting from satisfying the requirements. The similar is true for the fifth example.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.lang.*;
    public class templ {
        public static int a[]=new int[1000000];
    int binarySearch(long arr[], int l, int r, long x)
    {
        if (r >= l)
        {
            int mid = l + (r - l)/2;
            if (arr[mid] == x)
            return mid;
            if (arr[mid] > x) 
            return binarySearch(arr, l, mid-1, x);
            return binarySearch(arr, mid+1, r, x);
        }
        return -1;
    }
    int partition(int arr[],int a[], int low, int high)
    {
        int pivot = arr[high]; 
        int i = (low-1);
        for (int j=low; j<high; j++)
        {
            if (arr[j] <= pivot)
            {
                i++;
                int temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
                temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }
        int temp = arr[i+1];
        arr[i+1] = arr[high];
        arr[high] = temp;
        temp = a[i+1];
        a[i+1] = a[high];
        a[high] = temp;
 
        return i+1;
    }
    void sort(int arr[],int a[], int low, int high)
    {
        if (low < high)
        {
            int pi = partition(arr,a, low, high);
            sort(arr, a,low, pi-1);
            sort(arr,a, pi+1, high);
        }
    }
    public static void main(String[] args) throws FileNotFoundException {
     try
     {
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        templ ob=new templ();
        int l=in.nextInt();
        String s=in.nextLine();
        int u=0;
        int k=0;
        if(s.charAt(0)=='?')
            u++;
        for(int i=1;i<l;i++)
        {
            char c=s.charAt(i);
            char c1=s.charAt(i-1);
            if(c=='?')
                u++;
            else if(c==c1)
            {
                k=1;
                break;
            }
        }
        if(u==0||k==1)
        {
            out.println("No");
        }
        else
        {
            if(s.charAt(0)=='?'||s.charAt(l-1)=='?')
                out.println("Yes");
            else
            {
                int p=0;
                for(int i=1;i<l-1;i++)
                {
                    char c=s.charAt(i);
                    char c1=s.charAt(i-1);
                    char c2=s.charAt(i+1);
                    if(c=='?'&&(c1=='?'||c2=='?'))
                    {
                        p=1;
                        break;
                    }
                    if(c=='?'&&c1==c2)
                    {
                        p=1;
                        break;
                    }
                }
                if(p==1)
                    out.println("Yes");
                else
                    out.println("No");
            }
        }
        out.close();
    }
        catch(Exception e){
        return;
    }
    }
    static class InputReader {

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

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

        public int read() {
            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 = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                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 {
                res *= 10;
                res += c - '0';
                c = read();
            } 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 = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        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 boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

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

    }
}