#include <stdio.h>

int w[6], h[6];
int list[6], used[6];
int W[6], H[6];

int final()
{
int i;
  for(i = 0; i <= 2; i++)
  {
    if(W[i] != W[i+3] || H[i] != H[i+3]) return 0;
  }
  if(W[0] != W[1]) return 0;
  if(H[0] != W[2]) return 0;
  if(H[1] != H[2]) return 0;
  return 1;
}

int check(int x)
{
  if(x == 6) return final();
  W[x] = w[list[x]]; H[x] = h[list[x]];
  if(check(x+1)) return 1;
  W[x] = h[list[x]]; H[x] = w[list[x]];
  return check(x+1);
}

int generate(int x)
{
int i;
  if(x == 6) return check(0);
  for(i = 0; i < 6; i++)
  {
    if(used[i]) continue;
    list[x] = i;
    used[i] = 1;
    if(generate(x+1)) return 1;
    used[i] = 0;
  }
  return 0;
}

int main(void)
{
int i;
  freopen("box.in",  "rt", stdin);
  freopen("box.out", "wt", stdout);
  for(i = 0; i < 6; i++) scanf("%d%d", &w[i], &h[i]);
  if(generate(0)) printf("POSSIBLE\n");
  else printf("IMPOSSIBLE\n");
  return 0;
}