jiahuimbzuai/CoQuIR huggingface dataset:
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
    let tmp = input.split("\n");
    let num = tmp[0].split(" ").map(e=>~~e);
    let arr = tmp.slice(1, num[1]+1);
    // for(let i = 0;i < arr.length-1;i++) arr[i] = arr[i].slice(0, -1);
    arr = arr.filter(w=>!w.split("").every(a=>a=="."));
    let newArr = arr.map(e=>e.split(""));
    const transpose = a => a[0].map((_, c) => a.map(r => r[c]));
    let hoge = transpose(newArr);
    hoge = hoge.filter(w=>!w.every(a=>a=="."));
    let fuga = transpose(hoge);
    console.log(fuga.join("\n").replace(/,/g, ''));
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import (
        "bufio"
        "fmt"
        "os"
)

func solution(h, w int, a []string) [][]byte {
        memo := make([][]int, h+1)
        for i := range memo {
                memo[i] = make([]int, w+1)
        }

        for i := 0; i < h; i++ {
                for j := 0; j < w; j++ {
                        if a[i][j] == '.' {
                                memo[i][j]++
                        }
                }
        }

        for i := 0; i < h+1; i++ {
                sum := 0
                for j := 0; j < w+1; j++ {
                        sum += memo[i][j]
                        if j == w {
                                memo[i][j] = sum
                        }
                }
        }
        for j := 0; j < w+1; j++ {
                sum := 0
                for i := 0; i < h+1; i++ {
                        sum += memo[i][j]
                        if i == h {
                                memo[i][j] = sum
                        }
                }
        }

        b := make([][]byte, h)
        k := 0
        for i := 0; i < h; i++ {
                if memo[i][w] != w {
                        b[k] = []byte{}
                        k++
                }
                for j := 0; j < w; j++ {
                        if memo[i][w] != w && memo[h][j] != h {
                                b[k-1] = append(b[k-1], a[i][j])
                        }
                }
        }

        if k != h {
                b = b[:k]
        }
        return b
}

func main() {
        r := bufio.NewReader(os.Stdin)
        var h, w int
        fmt.Fscan(r, &h, &w)
        a := make([]string, h)
        for i := range a {
                fmt.Fscan(r, &a[i])
        }
        for _, b := range solution(h, w, a) {
                fmt.Println(string(b))
        }
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)

	sc.Scan()
	h, _ := strconv.Atoi(sc.Text())
	sc.Scan()
	w, _ := strconv.Atoi(sc.Text())

	skipRows := makeTrues(h)
	skipCols := makeTrues(w)
	white := byte('.')

	matrix := make([][]byte, h)
	for i := 0; i < h; i++ {
		sc.Scan()
		row := sc.Text()
		matrix[i] = make([]byte, w)

		skipRow := true
		for j := 0; j < w; j++ {
			matrix[i][j] = row[j]
			skipRow = skipRow && matrix[i][j] == white
			skipCols[j] = skipCols[j] && matrix[i][j] == white
		}
		skipRows[i] = skipRow
	}

	colIdxs := make([]int, 0)
	for j, skip := range skipCols {
		if !skip {
			colIdxs = append(colIdxs, j)
		}
	}

	out := bufio.NewWriter(os.Stdout)
	for i, row := range matrix {
		if skipRows[i] {
			continue
		}
		for _, j := range colIdxs {
			fmt.Fprintf(out, string(row[j]))
		}
		fmt.Fprintln(out)
	}
	out.Flush()
}

func makeTrues(n int) []bool {
	bs := make([]bool, n)
	for i := 0; i < n; i++ {
		bs[i] = true
	}
	return bs
}
//  [go]
// by syu
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
	"strings"
)

var in = NewScanner(os.Stdin, 0)

func main() {
	H, _ := in.Int(), in.Int()
	g := make([]string, H)
	for i := 0; i < H; i++ {
		g[i] = in.String()
	}
	g = FilterStrings(g, func(i int, bb string) bool {
		return strings.IndexByte(bb, '#') != -1
	})
	g = TransposeString(g)
	g = FilterStrings(g, func(i int, bb string) bool {
		return strings.IndexByte(bb, '#') != -1
	})
	g = TransposeString(g)
	PString(g)
}

type Scanner struct {
	*bufio.Scanner
}

func NewScanner(r io.Reader, max int) *Scanner {
	s := bufio.NewScanner(r)
	s.Split(scanWords)
	if max <= 0 {
		max = 1048576
	}
	s.Buffer([]byte{}, max)
	return &Scanner{s}
}
func (s *Scanner) String() string {
	s.Scan()
	return s.Text()
}
func (s *Scanner) Int() int {
	s.Scan()
	i, e := strconv.ParseInt(s.Text(), 10, 64)
	if e != nil {
		panic(e)
	}
	return int(i)
}
func isSpace(b byte) bool {
	return b == ' ' || b == '\n' || b == '\r' || b == '\t'
}
func scanWords(data []byte, atEOF bool) (advance int, token []byte, err error) {
	start := 0
	for start < len(data) && isSpace(data[start]) {
		start++
	}
	for i := start; i < len(data); i++ {
		if isSpace(data[i]) {
			return i + 1, data[start:i], nil
		}
	}
	if atEOF && len(data) > start {
		return len(data), data[start:], nil
	}
	return start, nil, nil
}
func FilterStrings(a []string, f func(int, string) bool) (r []string) {
	for i, x := range a {
		if f(i, x) {
			r = append(r, x)
		}
	}
	return
}
func TransposeString(slice []string) []string {
	xl := len(slice[0])
	yl := len(slice)
	result := make([]string, xl)
	for i := 0; i < xl; i++ {
		r := make([]byte, yl)
		for j := 0; j < yl; j++ {
			r[j] = slice[j][i]
		}
		result[i] = string(r)
	}
	return result
}
func Pf(f string, s ...interface{}) {
	fmt.Printf(f, s...)
}
func PString(a []string) {
	for i := 0; i < len(a); i++ {
		Pf("%s\n", a[i])
	}
}
//  [go]
package main

import "fmt"

func main() {
	var h, w int
	fmt.Scanf("%d %d\n", &h, &w)

	grid := make([]string, h)
	for i := 0; i < h; i++ {
		fmt.Scanf("%s\n", &grid[i])
	}

	hl, wl := map[int]bool{}, map[int]bool{}

	for i := 0; i < h; i++ {
		flg := true
		for j := 0; j < w; j++ {
			if string(grid[i][j]) != "." {
				flg = false
				break
			}
		}
		if flg {
			hl[i] = true
		}
	}

	for i := 0; i < w; i++ {
		flg := true
		for j := 0; j < h; j++ {
			if string(grid[j][i]) != "." {
				flg = false
				break
			}
		}
		if flg {
			wl[i] = true
		}
	}

	for i := 0; i < h; i++ {
		if !hl[i] {
			for j := 0; j < w; j++ {
				if !wl[j] {
					print(string(grid[i][j]))
				}
			}
			print("\n")
		}
	}

}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
	"strings"
)

const (
	initialBufSize = 100000
	maxBufSize     = 1000000
)

var sc *bufio.Scanner

func initScanner(r io.Reader) *bufio.Scanner {
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines
	return sc
}

func main() {
	sc = initScanner(os.Stdin)
	resolve()
}

func resolve() {
	// load and prepare
	h, w := scanInt(sc), scanInt(sc)
	grid := make([]string, h)
	whiteRow := make([]bool, h)
	whiteNum := make([]int, w)
	for i := 0; i < h; i++ {
		grid[i] = scanString(sc)
		whiteRow[i] = true
		for j := range grid[i] {
			if grid[i][j] != '.' {
				whiteRow[i] = false
			} else {
				whiteNum[j]++
			}
		}
	}

	// build output
	builder := &strings.Builder{}
	for i := 0; i < h; i++ {
		if whiteRow[i] {
			continue
		}
		for j := 0; j < w; j++ {
			if whiteNum[j] == h {
				continue
			}
			builder.WriteByte(grid[i][j])
		}
		builder.WriteByte('¥n')
	}
	// write answer
	fmt.Printf("%s", builder.String())
	return
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}
//  [ruby]
h, w = gets.split.map(&:to_i)
a = []
h.times do |i|
  s = gets.chomp
  a.push(s) if s.index('#')
end
(w - 1).downto(0) do |i|
  if a.all?{|x| x[i] == '.'}
    a.each do |x|
      x[i] = ''
    end
  end
end
puts a
//  [ruby]
h, w = gets.split.map(&:to_i)
a = []
h.times do |i|
  s = gets.chomp
  a.push(s) if s.count('.') != w
end
(w - 1).downto(0) do |i|
  if a.all?{|x| x[i] == '.'}
    a.each do |x|
      x[i] = ''
    end
  end
end
puts a
//  [ruby]
h, w = gets.split.map(&:to_i)
a = []
h.times do |i|
  s = gets.chomp
  a.push(s) if s.count('.') != w
end
(w - 1).downto(0) do |i|
  f = a.all?{|x| x[i] == '.'}
  if f
    a.each do |x|
      x[i] = ''
    end
  end
end
puts a
//  [ruby]
h, w = gets.chomp.split.map(&:to_i)
map = Array.new(h).map{Array.new(w)}
h.times do |i|
	map[i] = gets.chomp.split("")
end

ih = {}
jh = {}
h.times do |i|
	if map[i].uniq.length == 1
		ih[i] = true
	else
		ih[i] = false
	end
end
mapt = map.transpose
w.times do |i|
	if mapt[i].uniq.length == 1
		jh[i] = true
	else
		jh[i] = false
	end
end

h.times do |i|
	w.times do |j|
		print(map[i][j]) if ih[i] == false && jh[j] == false
	end
	puts if ih[i] == false
end
//  [ruby]
h, w = gets.chomp.split.map(&:to_i)
map = Array.new(h).map{Array.new(w)}
h.times do |i|
	map[i] = gets.chomp.split("")
end

ih = {}
jh = {}
h.times do |i|
	if map[i].uniq.length == 1
		ih[i] = true
	else
		ih[i] = false
	end
end
mapt = map.transpose
w.times do |i|
	if mapt[i].uniq.length == 1
		jh[i] = true
	else
		jh[i] = false
	end
end

puts
h.times do |i|
	w.times do |j|
		print(map[i][j]) if ih[i] == false && jh[j] == false
	end
	puts if ih[i] == false
end
//  [ruby]
h,w = gets.strip.split.map(&:to_i)
ary = []
h.times do
  a = gets.strip.to_s
  b = a.split("").map(&:to_s)
  unless b.uniq == ["."]
    ary << b
  end
end
arys = ary.transpose
w.times do |i|
  if arys[i].uniq == ["."]
    arys.delete_at(i)
  end
end
newary = arys.transpose
newary.size.times do |k|
  puts newary[k].join("")
end
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String {
            bytes
                .by_ref()
                .map(|r| r.unwrap() as char)
                .skip_while(|c| c.is_whitespace())
                .take_while(|c| !c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, [ $t:tt ]) => {
        {
            let len = read_value!($next, usize);
            (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
        }
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
use std::cmp::{min, max};

fn main() {
    input!{
        h: usize,
        w: usize,
        v: [chars; h]
    }
    let v: Vec<Vec<char>> = v.iter().cloned().filter(|s| s.iter().any(|&x| x == '#')).collect();
    let mut ans = vec![vec![]; v.len()];
    for j in 0..w {
        let mut f = false;
        for i in 0..v.len() {
            if v[i][j] == '#' {
                f = true;
                break;
            }
        }
        if !f {
            continue;
        }
        for i in 0..v.len() {
            ans[i].push(v[i][j]);
        }
    }
    for s in &ans {
        println!("{}", s.iter().cloned().collect::<String>());
    }
}
//  [rust]
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let h: usize = iterator.next().unwrap().parse().unwrap();
    let w: usize = iterator.next().unwrap().parse().unwrap();
    let mut map: Vec<Vec<char>> = Vec::new();
    for _ in 0..h {
        let line: Vec<char> = iterator.next().unwrap().chars().collect();
        map.push(line);
    }

    for r in (0..h).rev() {
        let mut is_all_white = true;
        for c in 0..w {
            if map[r][c] == '#' {
                is_all_white = false;
                break;
            }
        }
        if is_all_white {
            map.remove(r);
        }
    }

    for c in (0..w).rev() {
        let mut is_all_white = true;
        for r in 0..map.len() {
            if map[r][c] == '#' {
                is_all_white = false;
                break;
            }
        }
        if is_all_white {
            for r in 0..map.len() {
                map[r].remove(c);
            }
        }
    }

    let mut result = String::new();
    for line in &map {
        for &c in line {
            result.push(c);
        }
        result.push('\n');
    }
    return result.trim().to_string();
}
//  [rust]
use std::cmp::*;
use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let h: usize = itr.next().unwrap().parse().unwrap();
    let w: usize = itr.next().unwrap().parse().unwrap();
    let g: Vec<Vec<char>> = (0..h)
        .map(|_| itr.next().unwrap().chars().collect())
        .collect();

    let mut samer = vec![true; h];
    for i in 0..h {
        for j in 1..w {
            if g[i][0] != g[i][j] {
                samer[i] = false;
            }
        }
    }
    let mut samec = vec![true; w];
    for i in 0..w {
        for j in 1..h {
            if g[0][i] != g[j][i] {
                samec[i] = false;
            }
        }
    }

    let mut out = Vec::new();
    for i in 0..h {
        if samer[i] {
            continue;
        }
        for j in 0..w {
            if samec[j] {
                continue;
            }
            write!(out, "{}", g[i][j]).ok();
        }
        writeln!(out, "").ok();
    }
    stdout().write_all(&out).unwrap();
}
//  [rust]
use std::io::BufRead;
const DEBUG: bool = false;
fn main() {
    let mut f = read_field();
    let mut col = 0;
    while col < f.w as usize {
        while col < f.w as usize && f.is_column_empty(col) {
            f.remove_column(col);
        }
        col += 1;
    }
    let mut row = 0;
    while row < f.h as usize {
        while row < f.h as usize && f.is_row_empty(row) {
            f.remove_row(row);
        }
        row += 1;
    }
    f.show();
}

fn read_field() -> Field {
    let stdin = std::io::stdin();
    let mut input = stdin.lock();
    let mut l = String::new();
    let _ = input.read_line(&mut l);
    let hw: Vec<u32> = l
        .split_whitespace()
        .map(|n| n.parse().expect("readnumerror!"))
        .collect();
    let h = hw[0];
    let w = hw[1];
    let mut f: Vec<Cell> = Vec::with_capacity((h * w) as usize);
    for line in input.lines() {
        for c in line.expect("read line error").trim().chars() {
            match c {
                '.' => f.push(false),
                '#' => f.push(true),
                _ => panic!(format!("unexpected char {}", c)),
            }
        }
    }
    Field {
        h: h,
        w: w,
        field: f,
    }
}

struct Field {
    h: u32,
    w: u32,
    field: Vec<Cell>,
}

impl Field {
    fn is_column_empty(&self, n: usize) -> bool {
        !self
            .field
            .iter()
            .skip(n)
            .step_by(self.w as usize)
            .any(|&b| b)
    }
    fn is_row_empty(&self, n: usize) -> bool {
        if DEBUG {
            println!(
                "DEBUG: n {} f w{:?} h{:?}, f{:?}",
                n, self.w, self.h, self.field
            );
        }
        !self
            .field
            .iter()
            .skip(n * self.w as usize)
            .take(self.w as usize)
            .any(|&b| b)
    }
    fn remove_column(&mut self, n: usize) {
        if DEBUG {
            self.show();
            println!("|||||||||||@@@@");
        }
        let mut l = n;
        for _ in 0..self.h {
            self.field.remove(l);
            l += self.w as usize - 1;
        }
        self.w -= 1;
    }
    fn remove_row(&mut self, n: usize) {
        if DEBUG {
            self.show();
            println!("@@@@@@@@@@@@@@@");
        }
        for _ in 0..self.w {
            self.field.remove(n * self.w as usize);
        }
        self.h -= 1;
    }

    fn show(&self) {
        for y in 0..self.h as usize {
            let line: String = self.field[y * self.w as usize..(y + 1) * self.w as usize]
                .iter()
                .map(|&c| if c { '#' } else { '.' })
                .collect();
            println!("{}", line);
        }
    }
}

type Cell = bool;
//  [rust]
use std::io::BufRead;
const DEBUG: bool = false;
fn main() {
    let mut f = read_field();
    let mut col = 0;
    while col < f.w as usize {
        while col < f.w as usize && f.is_column_empty(col) {
            f.remove_column(col);
        }
        col += 1;
    }
    let mut row = 0;
    while row < f.h as usize {
        while row < f.h as usize && f.is_row_empty(row) {
            f.remove_row(row);
        }
        row += 1;
    }
    f.show();
}

fn read_field() -> Field {
    let stdin = std::io::stdin();
    let mut input = stdin.lock();
    let mut l = String::new();
    let _ = input.read_line(&mut l);
    let hw: Vec<u32> = l
        .split_whitespace()
        .map(|n| n.parse().expect("readnumerror!"))
        .collect();
    let h = hw[0];
    let w = hw[1];
    let mut f: Vec<Cell> = Vec::with_capacity((h * w) as usize);
    for line in input.lines() {
        for c in line.expect("read line error").trim().chars() {
            match c {
                '.' => f.push(false),
                '#' => f.push(true),
                _ => panic!(format!("unexpected char {}", c)),
            }
        }
    }
    Field { h, w, field: f }
}

struct Field {
    h: u32,
    w: u32,
    field: Vec<Cell>,
}

impl Field {
    fn is_column_empty(&self, n: usize) -> bool {
        !self
            .field
            .iter()
            .skip(n)
            .step_by(self.w as usize)
            .any(|&b| b)
    }
    fn is_row_empty(&self, n: usize) -> bool {
        if DEBUG {
            println!(
                "DEBUG: n {} f w{:?} h{:?}, f{:?}",
                n, self.w, self.h, self.field
            );
        }
        !self
            .field
            .iter()
            .skip(n * self.w as usize)
            .take(self.w as usize)
            .any(|&b| b)
    }
    fn remove_column(&mut self, n: usize) {
        if DEBUG {
            self.show();
            println!("|||||||||||@@@@");
        }
        let mut l = n;
        for _ in 0..self.h {
            self.field.remove(l);
            l += self.w as usize - 1;
        }
        self.w -= 1;
    }
    fn remove_row(&mut self, n: usize) {
        if DEBUG {
            self.show();
            println!("@@@@@@@@@@@@@@@");
        }
        for _ in 0..self.w {
            self.field.remove(n * self.w as usize);
        }
        self.h -= 1;
    }

    fn show(&self) {
        for y in 0..self.h as usize {
            let line: String = self.field[y * self.w as usize..(y + 1) * self.w as usize]
                .iter()
                .map(|&c| if c { '#' } else { '.' })
                .collect();
            println!("{}", line);
        }
    }
}

type Cell = bool;
//  [swift]
let i=readLine()!.characters.split(" ").map{Int(String($0))!},H=i[0],W=i[1],a=(0..<H).map{_ in readLine()!.characters.map{String($0)}}
var r=(0..<H).map{_ in false},c=(0..<W).map{_ in false}
for i in 0..<H{for j in 0..<W{if a[i][j]=="#"{r[i]=true;c[j]=true}}}
for i in 0..<H{if r[i]{for j in 0..<W{if c[j]{print(a[i][j],terminator: "")}};print()}}
//  [swift]
let input=readLine()!.characters.split(" ").map{Int(String($0))!}
let H=input[0],W=input[1]
let a=(0..<H).map{_ in readLine()!.characters.map{String($0)}}
var row=[Bool](count:H,repeatedValue:false)
var col=[Bool](count:W,repeatedValue:false)
for i in 0..<H{for j in 0..<W{if a[i][j]=="#"{row[i]=true;col[j]=true}}}
for i in 0..<H{if row[i]{for j in 0..<W{if col[j]{print(a[i][j],terminator: "")}};print()}}
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}

/*************** テストスペース ***************/

let input = readIntSplit(by: " ")
let (H, W) = (input[0], input[1])
var a = [[String]](repeating: [""], count: H)
for i in 0..<H {
    a[i] = readLine()!.toArray()
}

var row = [Bool](repeating: false, count: H)
var col = [Bool](repeating: false, count: W)
for i in 0..<H {
    for j in 0..<W {
        if a[i][j] == "#" {
            row[i] = true
            col[j] = true
        }
    }
}

for i in 0..<H {
    if row[i] {
        for j in 0..<W {
            if col[j] {
                print(a[i][j], terminator: "")
            }
        }
        print()
    }
}
//  [swift]
var i=readLine()!.characters.split(" ").map{Int(String($0))!},H=i[0],W=i[1],a=(0..<H).map{_ in readLine()!.characters.map{String($0)}},r=(0..<H).map{_ in 0},c=(0..<W).map{_ in 0}
for i in 0..<H{for j in 0..<W{if a[i][j]=="#"{r[i]=1;c[j]=1}}}
for i in 0..<H{if r[i]{for j in 0..<W{if c[j]{print(a[i][j],terminator: "")}};print()}}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);const tn=():number=>{const a=input[0];input.shift();return Number(a)};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{const a=input[0];input.shift();return String(a)};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const tc=():string=>{let a=input[0].split('');const b=a[0];a.shift();if(a.length>0){input[0]=a.join('')}else{input.shift()}return String(b)};const tcc=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(tc())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1];}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const objvs =(a)=>{const b=[];for(const v in a){b.push(a[v])}return b};
const main=()=>{
  let [h,w]=[tn(),tn()]
  let g=tss(h)
  
  for(let i=h-1;0<=i;i--){
    let c=true
    for(let j=w-1;0<=j;j--){
      if(g[i][j]!='.')c=false
    }
    if(c){
      g.splice(i,1)
      h--
    }
  }
  for(let j=w-1;0<=j;j--){
    let c=true
    for(let i=h-1;0<=i;i--){
      if(g[i][j]!='.')c=false
    }
    if(c){
      for(let i=h-1;0<=i;i--){
        let y = g[i].split('')
        y.splice(j,1)
        g[i]=y.join('') 
      }
      w--
    }
  }
  for(let i=0;i<h;i++){
    to(g[i])
  }
}
main()
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const [h, w] = stdin
  .split('\n')[0]
  .split(' ')
  .map(Number)

const [, ...a] = stdin.trim().split('\n')

const aij = a.map(e => e.split(''))

let delRowIdx = []
let delColIdx = []

for (let i = 0; i < h; i++) {
  let rowStreak = true

  for (let j = 0; j < w; j++) {
    const el = aij[i][j]

    if (i === 0) {
      delColIdx.push(el === '#' ? false : true)
    } else if (el === '#') {
      delColIdx[j] = false
    }

    if (el === '#') {
      rowStreak = false
    }

    if (j === w - 1 && rowStreak) {
      delRowIdx.push(i)
    }
  }
}

for (let i = 0; i < h; i++) {
  if (delRowIdx.indexOf(i) === -1) {
    const row = aij[i].filter((r, j) => !delColIdx[j])
    console.log(row.join(''))
  }
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const [, W] = input[0].map(Number);

  let field = input.slice(1, -1).map((line) => line[0]);

  field = field.filter((row) => !/^\.+$/.test(row));

  let count = 0;

  for (let j = 0; j < W; j++) {
    const cursor = j - count;

    if (field.every((row) => row[cursor] === ".")) {
      field = field.map(
        (row) => `${row.slice(0, cursor)}${row.slice(cursor + 1)}`
      );

      count += 1;
    }
  }

  return field.join("\n");
};

console.log(main(read()));
//  [typescript]
#include <bits/stdc++.h>
using namespace std;

int main()
{
  int h, w;
  cin >> h >> w;

  deque<string> rows;

  set<int> colIdxSet;

  for (int i = 0; i < h; i++)
  {
    string s;
    cin >> s;
    if (s.find('#') != string::npos)
    {
      for (int j = 0; j < s.size(); j++)
      {
        if (s[j] == '#')
        {
          colIdxSet.insert(j);
        }
      }
      rows.push_back(s);
    }
  }

  for (int i = 0; i < rows.size(); i++)
  {
    string row = rows[i];

    for (int j = 0; j < row.size(); j++)
    {
      if (colIdxSet.find(j) != colIdxSet.end())
      {
        cout << row[j];
      }
    }
    cout << endl;
  }

  return 0;
}
//  [typescript]
// yarn compile template.ts
{
	const process = (input: string[]) => {
		const h = parseInt(input[0].split(" ")[0])
		const w = parseInt(input[0].split(" ")[1])
		let b = input.filter((e, i) => i !== 0)

		let res = -1
		for (let i = 0; i < h; i++) {
			if (!/#/.test(b[i])) {
				res = i
				break
			}
		}
		if (res !== -1) {
			return b.filter((e, i) => i !== res).join("\n")
		}

		const c: string[][] = b.map((e) => e.split(""))
		let res2 = -1
		for (let j = 0; j < w; j++) {
			for (let i = 0; i < h; i++) {
				if (c[i][j] !== ".") {
					break
				}
				if (i === h - 1) {
					res = j
					break
				}
			}
			if (res !== -1) {
				break
			}
		}
		if (res !== -1) {
			return c.map((e) => e.filter((e, j) => j !== res).join("")).join("\n")
		}
		return b.join("\n")
	}

	const Main = (input: string): void => {
		//const num = parseInt(input)
		const ary = input.split("\n")
		console.log(process(ary))
	}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))
}
//  [typescript]
// yarn compile template.ts
{
	const process = (input: string[]) => {
		const h = parseInt(input[0].split(" ")[0])
		const w = parseInt(input[0].split(" ")[1])
		let b = input.filter((e, i) => i !== 0)

		let res = -1
		for (let i = 0; i < h; i++) {
			if (!/#/.test(b[i])) {
				res = i
				break
			}
		}
		if (res !== -1) {
			return b.filter((e, i) => i !== res).join("\n")
		}

		const c: string[][] = b.map((e) => e.split(""))
		let res2 = -1
		for (let j = 0; j < w; j++) {
			for (let i = 0; i < h; i++) {
				if (c[i][j] !== ".") {
					break
				}
				if (i === h - 1) {
					res = j
					break
				}
			}
			if (res !== -1) {
				break
			}
		}
		if (res !== -1) {
			return c.map((e) => e.filter((e, j) => j !== res).join("")).join("\n")
		}
		return b.join("\n")
	}

	const Main = (input: string): void => {
		//const num = parseInt(input)
		const ary = input.split("\n")
		console.log(process(ary))
	}
/Main(require("fs").readFileSync("/dev/stdin", "utf8"))
}
//  [python]
K = int(input())
A,B = map(int, input().split())
check = 0
for i in range(A,B+1):
    if i%K == 0:
        print('OK')
        check = -1
        break
if check != -1:
    print('NG')
//  [python]
k=int(input())
a,b=map(int, input().split())
t=0
while t<a:
    t+=k
if t<=b:
    print('OK')
else:
    print('NG')
//  [python]
k= int(input())
a,b = map(int, input().split())

for i in range(a,b+1):
    if i % k ==0:
        print('OK')
        break
else:
    print('NG')
//  [python]
k=int(input())
a,b=map(int,input().split())

if a%k==0 or b%k==0:
  print("OK")
elif (a-b)==0 and k==1:
  print("OK")
elif (a-b)>=k:
  print("OK")
else:
  print("NG")
//  [python]
K = int(input())
A = int(input())
B = int(input())
""" K=4
A=5
B=7 """
q=0


for i in range(1,1000):
    if A <= i*K & i*K <= B:
        print("OK")
        q=1
        break

if q == 0:
    print("NG")
//  [java]

import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}


public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		FastScanner fs =  new FastScanner();


		int K = fs.nextInt();
		int A = fs.nextInt();
		int B = fs.nextInt();

		for(int i = A; i <= B; i++) {
			if(i % K == 0) {
				System.out.println("OK");
				return;
			}
		}
		System.out.println("NG");

	}

}
//  [java]
//master
import java.io.*;
import java.util.*;
public class Main {
    static int[][] memo;
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int n = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        for(int i = 1; i<=1000; i++) {
            int k = i*n;
            if(k>=b && k<=c) {
                p("OK");
                return;
            }
        }
        p("NG");
}

    public static <T> void p(T message) {
        System.out.println(message);
    }

    public static <T> void pe(T message) {
        System.err.println(message);
    }

    public static <T> void pp(T message) {
        System.out.print(message);
    }
    
}
class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
 
    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }
 
    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }
 
    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
        return hasNextByte();
    }
 
    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
 
    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
 
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }
 
    public double nextDouble() {
        return Double.parseDouble(next());
    }
}
//  [java]
import java.math.BigInteger;
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        int K = Integer.parseInt(in.readLine());
        String[] s = in.readLine().split(" ");
        int A = Integer.parseInt(s[0]);
        int B = Integer.parseInt(s[1]);
        if(A % K == 0) {
            System.out.println("OK");
        } else {
            int mod = A % K;
            int num = A + (K - mod);
            if(num <= B && num >= A) {
                System.out.println("OK");
            } else {
                System.out.println("NG");
            }
        }
    }
}
//  [java]
import java.io.*;
import java.util.*;

public class Main{
	
	static long mod=(long)1e9+7;
	
	public static void main(String[] args) throws IOException {
		Writer out=new Writer(System.out);
		Reader in=new Reader(System.in);
		int ts=1;
		
		outer: while(ts-->0) {	
			long x=in.nextLong();
			long c=100;
			int i;
			for(i=1;;i++) {
				c=c+c/100;
				if(x<=c) break;
			}
			out.println(i);
		}
		out.close();		
		
	}

	static boolean tri(int a, int b, int c) {
		if(c<a+b && c>abs(a-b)) return true;
		return false;
	}
	
	
/*********************************** UTILITY CODE BELOW **************************************/	
		
	static int abs(int a) {
		return a>0 ? a : -a;
	}
	
	static int max(int a, int b) {
		return a>b ? a : b;
	}
	
	static int pow(int n, int m) {
		if(m==0) return 1;
		int temp=pow(n,m/2);
		long res=(((long)temp*temp)%mod);
		if(m%2==0) return (int)res;
		return (int)((res*n)%mod);
	}
	
	static class Pair{
		int u, v;
		
		Pair(int u, int v){this.u=u; this.v=v;}
		
		static void sort(Pair [] coll) {		
			List<Pair> al=new ArrayList<>(Arrays.asList(coll));
			Collections.sort(al,new Comparator<Pair>() {
				public int compare(Pair p1, Pair p2) {
					return p1.u-p2.u;
				}	
			});
			for(int i=0; i<al.size(); i++) {
				coll[i]=al.get(i);
			}
		}
		
	}
	
	static void sort(int[] a) {
		ArrayList<Integer> list=new ArrayList<>();
		for (int i:a) list.add(i);
		Collections.sort(list);
		for (int i=0; i<a.length; i++) a[i]=list.get(i);
	}
	
	static void sort(long a[]) {
		ArrayList<Long> list=new ArrayList<>();
		for(long i: a) list.add(i);
		Collections.sort(list);
		for(int i=0; i<a.length; i++) a[i]=list.get(i);
	}
	
	static int [] array(int n, int value) {	
		int a[]=new int[n];
		for(int i=0; i<n; i++) a[i]=value;
		return a;
	}
	
	static class Reader{
		
		BufferedReader br;
		StringTokenizer to;
		
		Reader(InputStream stream){
			br=new BufferedReader(new InputStreamReader(stream));
			to=new StringTokenizer("");
		}
		
		String next() {
			while(!to.hasMoreTokens()) {
				try {
					to=new StringTokenizer(br.readLine());	
				}catch(IOException e) {}
				
			}
			return to.nextToken();
			
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		
		long nextLong() {
			return Long.parseLong(next());
		}
		
		int [] readArray(int n) {
			int a[]=new int[n];
			for(int i=0; i<n ;i++) a[i]=nextInt();
			return a;
		}
		long [] readLongArray(int n) {
			long a[]=new long[n];
			for(int i=0; i<n ;i++) a[i]=nextLong();
			return a;
		}
		
	}
	
	static class Writer extends PrintWriter{
		Writer(OutputStream stream){
			super(stream);
		}
		void println(int [] array) {
			for(int i=0; i<array.length; i++) {
				print(array[i]+" ");
			}
			println();
		}
		void println(long [] array) {
			for(int i=0; i<array.length; i++) {
				print(array[i]+" ");
			}
			println();
		}
	}
	
}
//  [java]
import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int k = sc.nextInt();
    int a = sc.nextInt();
    int b = sc.nextInt();
    System.out.println(((b - a + 1) >= k) ? "OK" : "NG");
  }
}
//  [java]
import java.util.Scanner;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int K = sc.nextInt();
    int A = sc.nextInt();
    int B = sc.nextInt();
    int flag = 0;
    for(int i = A; i<=B; i++){
            if(i%K == 0){
              flag++;
              break;
            }
    }
    if(flag==0){
      System.out.println("NG");
    }else if(flag==1){
      System.out.println("Yes");
    }
  }
}
//  [cpp]
#include <stdio.h>
#include <string.h>


int main(){
    int K,A,B;
    int a1,a2,b1,b2,i;

    scanf("%d", &K);
    scanf("%d %d", &A, &B);

    a1 = A / K;
    b1 = B / K;

    for(i = a1; i <= b1; i++){
        if ((A <= (i * K) && (i * K) <= B))
        {
            printf("OK");
            return 0;
        }
    }
    printf("NG");

    return 0;
}
//  [cpp]
#include <stdio.h>
int main(void) {
	int k, a ,b, i, flag=0;
	scanf("%d %d %d", &k, &a, &b);
	for(i=a; i<=b; i++){
		if(i%k==0){
			printf("OK");
			flag=1;
			break;
		}
	}
	if(flag==0)
		printf("NG");
	return 0;
}
//  [cpp]
#include<stdio.h>
int main()
{
	int k,a,b;
	int i;
	int sum=0;
	scanf("%d%d%d",&k,&a,&b);
	for(i=0;i<1000;i++)
	{
		sum+=k;
		//printf("sum=%d\n",sum);
		if(sum>=a&&sum<=b)
		{
			printf("OK\n");
			break;
		}
		if(sum>b)
		{
			printf("NG\n");
			break;
		}
	}
	
	
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;;
typedef long long ll;

int main(){
    ll x;
    cin >> x;
    ll money = 100;
    ll ans = 0;
    while(money<x){
        ans++;
        money += money/100;
    }
    cout << ans << endl;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int k,a,b;
    cin>>k>>a>>b;
    for(int i=a;i<=b;i++)
    if(i%k==0)
    {
    cout<<"OK"<<endl;
    break;
    }
    else
    {
    cout<<"NG"<<endl;
    break;
    }
    
    return 0;
}
//  [cpp]
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define ll long long
#define mm(arr) memset(arr, 0, sizeof(arr))
#define scanArray(a,n) for(int i = 0; i < n; i++){cin >> a[i];}
#define pb push_back
#define PI 3.141592653589793
#define MOD 1000000007

using namespace std;
int main(){
    FAST
    int k,a,b; cin >> k >> a >> b;
    for(int i=a;i<=b;i++){
        if(i%a == 0){
            cout << "OK" << endl;
            return 0;
        }
    }
    cout << "NG" << endl;
    

    return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int k, a, b;
	scanf("%d%d%d", &k, &a, &b);
	if (a % k == 0 || b / k > a / k)
		printf("OK\n");
	else
		printf("NG\n");
	return 0;
}
//  [c]
#include <stdio.h>

int main(){
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  for(int i=a; i<=b; i++){
    if(i%n == 0){
      printf("OK\n");
      return 0;
    }
  }
  printf("NG\n");
  return 0;
}
//  [c]
#include<stdio.h>
#include<math.h>
#include<string.h>

int main()
{
	int K;
	int A, B;
	scanf("%d", &K);
	scanf("%d %d", &A, &B);
	
	int r;
	int c = 0;
	for(r=A; r<=B; r++){
		if(r % K == 0){
			c = 1;
			break;
		}
	}
	
	if(c == 0) printf("NG");
	else printf("OK");
	
	return 0;
	
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<time.h>
#define FOR(i,n) for(int i=0;i<n;i++)
#define PRN(n) printf("%d\n",n)
#define PRF(n) printf("%lf\n",n)
#define PRL(n) printf("%lld\n",n)
#define PRS(s) printf("%s\n",s)
#define PRC(c) printf("%c",c)
#define INI(n) scanf("%d",&n)
#define INL(n) scanf("%lld",&n)
#define INF 10000000000
#define mod 1000000007
#define X 100000
#define N 20
#define M 46
typedef long long int ll;
ll finv[X];
ll fac[X];
ll inv[X];
ll usort(const void *a, const void *b){return *(ll*)a-*(ll*)b;}
ll dsort(const void *a, const void *b){return *(ll*)b-*(ll*)a;}
ll ssort(const void *a, const void *b){return strcmp((char*)a,(char*)b);}
void Iswap(int *a,int *b){
  int t=*a;
  *a=*b;
  *b=t;
}
void Fswap(double *a,double *b){
  double t=*a;
  *a=*b;
  *b=t;
}
void Lswap(ll *a,ll *b){
  ll t=*a;
  *a=*b;
  *b=t;
}
ll min(ll a,ll b){
  if(a>b)return b;
  return a;
}
ll max(ll a,ll b){
  if(a>b)return a;
  return b;
}
ll z(ll a){return max(a,-a);}
ll gcd(ll a,ll b){if(!b){return a;}else{return gcd(b,a%b);}}
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
ll kt(ll a){
  ll sum=0;
  while(a){
    a/=10;
    sum++;
  }
  return sum;
}
ll ks(ll a){
  ll sum=0;
  while(a){
    sum+=a%10;
    a/=10;
  }
  return sum;
}
void nCrReady(){
  fac[0]=fac[1]=1;
  finv[0]=finv[1]=1;
  inv[1]=1;
  for (ll i=2;i<X;i++){
    fac[i]=fac[i-1]*i%mod;
    inv[i]=mod-inv[mod%i]*(mod/i)%mod;
    finv[i]=finv[i-1]*inv[i]%mod;
  }
}
ll nCr(ll n,ll k){return fac[n]*(finv[k]*finv[n-k]%mod)%mod;}
ll modpow(ll a,ll n){
  ll res=1;
  while(n>0){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}
int main(void){
  int k;
  INI(k);
  int a;
  INI(a);
  int b;
  INI(b);
  for(int i=a;i<b+1;i++){
    if(i%k<1){
      PRS("Yes");
      return 0;
    }
  }
  PRS("No");
  return 0;
}
//  [c]
#include <stdio.h>

int main()
{
	int k;
	int a;
	int b;

	scanf("%d", &k);
	scanf("%d %d", &a, &b);
	while (a < b)
	{
		if (a % k == 0)
		{
			printf("OK\n");
			return;
		}
		a++;
	}
	printf("NG\n");
  	return;
}
//  [c]
#include <stdio.h>

int main()
{
	int k;
	int a;
	int b;

	scanf("%d", &k);
	scanf("%d %d", &a, &b);
	while (a < b)
	{
		if (a % k == 0)
		{
			printf("OK");
			return;
		}
		a++;
	}
	printf("NG");
  	return;
}
//  [javascript]
function Main(input){
  input = input.split('\n').map(x=>x.split(' ').map(y=>parseInt(y)));
  var ans = 'NG';
  for (i=input[1][0];i<=input[1][1];i++){
    if (i%input[0][0] == 0){
      ans = 'OK';
      break;
    }
  }
  console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const main = (inputs) => {
  var array = inputs[0].split(" ");
  var array2 = inputs[1].split(" ");

  var K = Number(array);
  var A = Number(array2[0]);
  var B = Number(array2[1]);


  var num = K * Math.floor(B / K)


  if (num >= A && num <= B) {
    console.log('OK');
  } else {
    console.log('NG');
  }

}
main(require('fs').readFileSync('/dev/stdin', 'UTF-8').trim().split("\n"));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
// 1行目がinput[0], 2行目がinput[1], …に入る
　input = input.split("\n");
  k = ~~input[0]
　a = ~~input[1].split(" ")[0];
  b = ~~input[1].split(" ")[1];
  let i=k;
  while (i <= b){
    if(i >= a && i <= b ){
      console.log("OK");
      return;
    }
    i += k;
  }
  console.log("NG")
  return;
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
const main = (input) => {
    input = input.split('\n');
    const K = input[0];
    const tmp = input[1].split(' ');
    const A = tmp[0];
    const B = tmp[1];

    for (let i = A; i <= B; i++) {
        if (i % K === 0) {
            console.log('OK');
            return;
        }
    }

    console.log('NG');
};

// 標準入力
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input = input.split('\n');
  const first = BigInt(input[0]);

  let year = 0;
  let stock = BigInt(100);
  while (stock < first) {
    stock = BigInt(Math.trunc(Number(stock) * 1.01))
    // if (stock >= first) {
    //   console.log(year)
    //   break
    // }

    year++;
  }
  console.log(year)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict"
const create = () => {
    const input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
    const res = {
        "list": input, "index": 0, "max": input.length,
        "hasNext": function() {return this.index < this.max},
        "next": function() { if (!this.hasNext()) {throw "ArrayIndexOutOfBoundsException";}else{return this.list[this.index++];}}
    };
    return res;
}
const o = create();
const next = () => o.next()
const nextInt = () => parseInt(o.next())
const nextStrArray = () => o.next().split(" ")
const nextIntArray = () => o.next().split(" ").map(el => parseInt(el))
const nextCharArray = () => o.next().split("")
const hasNext = () => o.hasNext()
const myout = (...x) => console.log(...x)
const Main = () => {
    const K = nextInt()
    const [A, B] = nextIntArray()
    let tmp = 0
    while(tmp<=B){
        tmp = tmp + K
        if(A <= tmp && tmp <=B) console.log("OK")
    }
    console.log("NG")
}
Main()
//  [go]
package main

import (
	"fmt"
)

func main() {
	var k, a, b int
	fmt.Scanf("%d\n%d %d", &k, &a, &b)
	for i := a; i <= b; i++ {
		if i%k == 0 {
			fmt.Println("OK")
			return
		}
	}
	fmt.Println("NG")
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	const initialBufSize = 4096
	const maxBufSize = 1000000
	scanner.Buffer(make([]byte, initialBufSize), maxBufSize)
	scanner.Split(bufio.ScanWords)
	var K int64
	scanner.Scan()
	K, _ = strconv.ParseInt(scanner.Text(), 10, 64)
	var A int64
	scanner.Scan()
	A, _ = strconv.ParseInt(scanner.Text(), 10, 64)
	var B int64
	scanner.Scan()
	B, _ = strconv.ParseInt(scanner.Text(), 10, 64)
	fmt.Println(solve(K, A, B))
}
func solve(K int64, A int64, B int64) string {
	for i := A; i <= B; i++ {
		if i%K == 0 {
			return "OK"
		}
	}
	return "NG"
}
//  [go]
package main
 
import (
  "fmt"
)
 
func main() {
  var k, a, b int
  fmt.Scanf("%d", &k)
  fmt.Scanf("%d %d", &a, &b)
  
  ans := "NG"
  if a % k == 0 {
    ans = "Yes"
  }
  if (a/k) < (b/k) {
    ans = "Yes"
  }
  fmt.Printf("%s\n", ans)
}
//  [go]
package main

import "fmt"

func main() {
	var k, a, b int
	fmt.Scan(&k, &a, &b)
	if a%k == 0 || b%k == 0 {
		fmt.Println("OK")
		return
	}

	if b-a >= k {
		fmt.Println("OK")
		return
	}

	fmt.Println("NG")
}