/*
 * Created on 01.12.2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

/**
 * @author B21
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */

import java.io.*;
import java.util.*;

public class box {

	static class Side {
	
		final int x, y;
		
		int cnt;
		
		Side(int a, int b) {
			if (a > b) {
				x = b; y = a;
			} else {
				x = a; y = b;
			}
			
		}
		
		public boolean equals(Object o) {
			Side s = (Side) o;
			return x == s.x && y == s.y;
		}
		
		int getX(int n) {
			return n == 1 ? y : x;
		}
		

		int getY(int n) {
			return n == 1 ? x : y;
		}
		
	}
	
	public static void main(String[] args) throws IOException {
		StreamTokenizer in = new StreamTokenizer(new FileReader("box.in"));
		ArrayList sd = new ArrayList();
		for (int i = 0; i < 6; i++) {
			in.nextToken();
			int a = (int) in.nval;
			in.nextToken();
			Side s = new Side(a, (int) in.nval);
			int d = sd.indexOf(s);
			if (d >= 0)
				((Side) sd.get(d)).cnt++;
			else
				sd.add(s);			
		}
		FileWriter out = new FileWriter("box.out");
		if (sd.size() == 1) {
			Side t = (Side) sd.get(0);
			out.write(t.x == t.y ? "POSSIBLE" : "IMPOSSIBLE"); out.close(); return;
		}
		if (sd.size() == 2) {
			Side t = (Side) sd.get(0);
			Side w = (Side) sd.get(1);
			if (t.cnt == 1) {
				out.write(t.x == t.y && (t.x == w.x || t.x == w.y ) ? "POSSIBLE" : "IMPOSSIBLE"); out.close(); return;
			} else if (t.cnt == 3) {
				out.write(w.x == w.y && (w.x == t.x || w.x == t.y ) ? "POSSIBLE" : "IMPOSSIBLE"); out.close(); return;
			} else {
				out.write("IMPOSSIBLE"); out.close(); return;
			}
		}
		if (sd.size() != 3) {
			out.write("IMPOSSIBLE"); out.close(); return;
		}
		Side[] a = new Side[3];
		sd.toArray(a);
		for (int i = 0; i < 2; i++) {
			if (a[i].cnt != 1) {
				out.write("IMPOSSIBLE"); out.close(); return;
			}				
		}
		for (int i = 0; i <= 1; i++)
			for (int j = 0; j <= 1; j++)
				for (int k = 0; k <= 1; k++)
					if (a[0].getY(i) == a[1].getX(j) &&
							a[0].getX(i) == a[2].getX(k) &&
							a[1].getY(j) == a[2].getY(k)) {
						out.write("POSSIBLE"); out.close(); return;
					}
		Side t = a[1]; a[1] = a[2]; a[2] = t;
		for (int i = 0; i <= 1; i++)
			for (int j = 0; j <= 1; j++)
				for (int k = 0; k <= 1; k++)
					if (a[0].getY(i) == a[1].getX(j) &&
							a[0].getX(i) == a[2].getX(k) &&
							a[1].getY(j) == a[2].getY(k)) {
						out.write("POSSIBLE"); out.close(); return;
					}
		out.write("IMPOSSIBLE"); out.close();		
	}
}
