read k
read a b

v="$((a+b+k))"
s="$((b-a))"
ans=0

for i in `seq $((s))`
do
tmp="$((a+i-1))"
tmp="$((tmp%k))"
if [ $tmp = 0 ]; then
  ans=1
fi
done

tmp="$((i+1))"
tmp="$((tmp%k))"
if [ $tmp = 0 ]; then
  ans=1
fi

if [ $ans = 1 ]; then
	echo "OK"
else
	echo "NG"
fi