function main(input) {
  input = input.trim();
  const a = input.split("\n");
  const k = a[0].split(" ").map(Number);
  const ab = a[1].split(" ").map(Number);
  var ans = "NG";
  for (var i = ab[0]; i <= ab[1]; i++) {
				if (i % k[0] == 0) {
					ans = "OK";
					break;
				}
			}
	console.log(ans);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));