package main import ( "bufio" "os" "strconv" "fmt" ) var s = bufio.NewScanner(os.Stdin) func next() string { s.Split(bufio.ScanWords) s.Scan() return s.Text() } func nextInt() int { i, e := strconv.Atoi(next()) if e != nil { panic(e) } return i } func nextLong() int64 { i, e := strconv.ParseInt(next(), 10, 64) if e != nil { panic(e) } return i } func main() { N := nextInt() _ = nextInt() ans := 0 for i := 2; i*i <= N; i++ { if N%i == 0 { ans = N/i } } fmt.Println(ans) }