const processData = (lines) => {
  const k = +lines[0]
  const [a, b] = lines[1].split(' ').map(x => +x)

  const aK = Math.floor(a/k)
  const bK = Math.floor(b/k)

  if (aK !== bK) {
    console.log('OK')
  } else {
    if(a%k === 0 || b%k === 0) {
      console.log('OK')
    } else {
      console.log('NG')
    }
  }
}

let i = ''
process.stdin.on('data', c => i += c)
process.stdin.on('end', () => {
  const {EOL} = require('os')
  const lines = i.split(EOL) /*your input text, split by lines*/
  processData(lines)
})
