'use strict'

const dfs = x => {
  //
}
function main(input) {
  input = input.split('\n').map(v => v.split(' ').map(v => ~~v))
  const n = input[0][0]
  const ships = input.slice(1, input.length)

  //並び替え
  let ships2 = ships.sort((a, b) => {
    return a[0] - b[0]
  })
//   ships2.map(v => {
//     console.log(v[0], v[1])
//   })

  let ans = 'IMPOSSIBLE'
  for (let i = 0; i < ships2.length; i++) {
    if (ships[i][0] == 1) {
      for (let j = 0; j < ships2.length; j++) {
        if (ships2[i][1] == ships2[j][0] && ships2[j][1] == n) {
          console.log('POSSIBLE')
          return
        }
      }
    }
  }
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))