import java.util.*; class Main{ public static void main (String[] args) { Scanner s = new Scanner(System.in); int l = 0; int n = 0; for (int i =0; i<3 ;i++){ int a =s.nextInt(); int b =s.nextInt(); l = (int)Math.pow(a,b); n += l; } if(n%2 == 0){ System.out.println(":-)"); }else{ System.out.println(":-("); } } }