Squash Apps interview question

Write a java program to [1,1,2] Yes and [1,2,2] No.