#include <stdio.h>

int main() {
    int k, a, b;
    scanf("%d", &k);
    scanf("%d %d", &a, &b);
    int a_ = a % k, b_ = b % k;
    printf("%d %d", a_, b_);
    printf(!a_ || (b - a) / (double) k >= 1 || b_ < a_ ? "OK" : "NG");
    return 0;
}
