1. 

/**
* FWP, Ausgew¤hlte Probleme aus dem ACM Programming Contest, SS10
* Problem: 11608 NoProblem
* Link: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&category=78&problem=2655&mosmsg=Submission+received+with+ID+7915490
*
* @author Barny Porcio
* @version 1.0, 04/22/2010
*
* Method : -
* Status : Accepted
* Runtime: 0.296
*/
import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int counter = 1;
for (int i = sc.nextInt(); i >= 0; i = sc.nextInt()){
System.out.println("Case "+counter+":");
int[] aviable = new int[12];
for (int z = 0; z<12 ; ++z){
aviable[z] = sc.nextInt();
}

for (int z = 0; z<12 ; ++z){
if (z != 0){
i = i + (aviable[z-1]);
}
int need = sc.nextInt();
if (i < need)
System.out.println("No problem. :(");
else{
System.out.println("No problem! :D");
i = i - need;
}

}
++counter;
}
return;
}
}