import java.util.Scanner; public class Main2 { static Scanner scan = new Scanner(System.in); static int W, H; static int[][] M; static boolean[][] F; static int[] dx = {0, 0, 1, -1}; static int[] dy = {1, -1, 0, 0}; public static void main(String[] args) { W = scan.nextInt(); H = scan.nextInt(); M = new int[H][W]; F = new boolean[H][W]; for(int i=0; i= W || ny < 0 || ny >= H) continue; if(M[ny][nx] != number) continue; if(F[ny][nx]) { System.out.println("possible"); System.exit(0); } if(F[ny][nx]) continue; solve(ny, nx, i); } } }