// Arup Guha
// 4/23/2024
// Checker for Spring 2024 COP 3503 Program 6A: GCD Sum

import java.util.*;
import java.io.*;

public class check_gcdsum {

	public static void main(String[] args) throws Exception {
	
		// First command line argument is input file.
		Scanner stdin = new Scanner(new File(args[0]));
		
		// Second is student output.
		Scanner studentOut = new Scanner(new File(args[1]));
		
		// Third is correct output.
		Scanner sol = new Scanner(new File(args[2]));
		
		// Get list length, # of partitions.
		int n = stdin.nextInt();
		int k = stdin.nextInt();
		
		// Read in list
		long[] nums = new long[n];
		for (int i=0; i<n; i++)
			nums[i] = stdin.nextLong();
		
		// Get all student output, tokenized. Assume 1 long followed by ints. Will crash otherwise.
		ArrayList<Integer> student = new ArrayList<Integer>();
		long studans = -1;
		if (studentOut.hasNext())
			studans = studentOut.nextLong();
		while (studentOut.hasNext())
			student.add(studentOut.nextInt());
		
		// Get real solution.
		long maxsum = sol.nextLong();
		
		// Here we check the main answer.
		int score = 0;
		if (maxsum == studans) 
			score = 2;
		
		// Only in this case does the partition have a shot of counting for credit.
		if (score == 2 && student.size() == k) {
		
			// copy partition, 0 based.
			int[] start = new int[k+1];
			for (int i=0; i<k; i++)
				start[i] = (student.get(i))-1;
			start[k] = n;
			
			// Only grade if partition is valid.
			if (validate(start, k, n)) {
				
				long res = 0;
				
				// Do gcd for each partition and add.
				for (int i=0; i<k; i++) {
					long curgcd = nums[start[i]];
					for (int j=start[i]; j<start[i+1]; j++)
						curgcd = gcd(curgcd, nums[j]);
					res += curgcd;
				}
				
				// It works!
				if (res == maxsum) 
					score = 4;
			}
		}
		
		// Report results.
		if (score == 0) System.out.println("0 points. Incorrect max sum.");
		if (score == 2) System.out.println("2 points. Correct sum only.");
		if (score == 4) System.out.println("4 points. Correct sum and partition.");
		
	}
	
	// Returns true iff start is a sorted array of distinct values with the first item 0.
	public static boolean validate(int[] start, int k, int n) {
		if (start[0] != 0) return false;
		for (int i=0; i<k; i++)
			if (start[i] >= start[i+1])
				return false;
		return true;
	}
	
	public static long gcd(long a, long b) {
		return b == 0 ? a : gcd(b, a%b);
	}
}