package main import ( "bufio" "fmt" "os" "sort" "strconv" "strings" ) func main() { sc := bufio.NewScanner(os.Stdin) sc.Buffer(make([]byte, 100000*11+2), 100000*11+2) sc.Scan() ss := strings.Fields(sc.Text()) N, _ := strconv.Atoi(ss[0]) K, _ := strconv.Atoi(ss[1]) sc.Scan() tt := strings.Fields(sc.Text()) A := make([]int, N) for i := 0; i < N; i++ { A[i], _ = strconv.Atoi(tt[i]) } sort.Slice(A, func(i, j int) bool { return A[i] < A[j] }) k1 := sort.Search(N, func(i int) bool { return A[i]*A[N-1] >= 2*K }) // k2 := sort.Search(N, func(i int) bool { return A[i]*A[0] >= 2*K }) // fmt.Fprintln(os.Stderr, k1, k2) count := 0 for i := k1; i < N; i++ { k := sort.Search(N, func(j int) bool { return A[i]*A[j] >= 2*K }) count += N - k } fmt.Println(count) }