1.


/**
* FWP, Ausgewählte Probleme aus dem ACM Programming Contest, WS09
* Problem: 11063 B2-Sequence
* Link: http://uva.onlinejudge.org/external/110/11063.html
*
* @author Christoph Hausmann
* @version 0.1, 10/7/2009
*
* Method : Ad-Hoc
* Status : Accepted
* Runtime: 0.112
*/

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;


public class B2Sequence_11063 {
public static void main(String... args) {
final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

try {
for(int count = 1; true; count++) {
final int numOfEle = Integer.parseInt(br.readLine());
final int[] elements = parseNums(br.readLine());

if(testBigger(elements) && testSums(elements)) {
System.out.println("Case #" + count + ": It is a B2-Sequence.");
} else {
System.out.println("Case #" + count + ": It is not a B2-Sequence.");
}
System.out.println();

br.readLine();
}
} catch(Exception e) {
// do nothing ... :)
}
}

private static boolean testSums(int[] elements) {
final Set<Integer> sums = new HashSet<Integer>();

for(int i = 0; i < elements.length; i++) {
for(int j = i; j < elements.length; j++) {
if(!sums.add(elements[i]+elements[j]))
return false;
}
}

return true;
}

private static boolean testBigger(int[] elements) {
if(elements[0] < 1)
return false;

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

return true;
}

public static int[] parseNums(String readLine) {
final String[] split = readLine.split(" ");
final int[] nums = new int[split.length];

for(int i = 0; i < split.length; i++) {
nums[i] = Integer.parseInt(split[i]);
}

return nums;
}
}