During a day $2016$ customers visited the store. Every customer has been only once at the store(a customer enters the store,spends some time, and leaves the store). Find the greatest integer $k$ that makes the following statement always true.

We can find $k$ customers such that either all of them have been at the store at the same time, or any two of them have not been at the same store at the same time.
1. **Lemma:**
   Among any \( mn+1 \) closed intervals, there are either \( m \) intervals that share a common point, or \( n \) intervals that are pairwise disjoint.

2. **Proof of Lemma:**
   We proceed by induction on \( n \).

   - **Base Case:**
     For \( n = 1 \), the statement is trivial. Among any \( m \cdot 1 + 1 = m + 1 \) intervals, there are either \( m \) intervals that share a common point, or \( 1 \) interval that is pairwise disjoint (which is trivially true).

   - **Inductive Step:**
     Assume the statement holds for \( n \). We need to show it holds for \( n+1 \).

     Let the intervals be \( [a_1, b_1], [a_2, b_2], \ldots, [a_{m(n+1)+1}, b_{m(n+1)+1}] \) with \( b_1 \leq b_2 \leq \ldots \leq b_{m(n+1)+1} \).

     Assume that among any \( m \) intervals, two of them are disjoint. Therefore, there are at most \( m-1 \) intervals \( [a_i, b_i] \) such that \( a_i \) is smaller than \( b_1 \). Put these intervals (i.e., \( [a_1, b_1] \) and intervals having \( a_i \) smaller than \( b_1 \)) away. There are at least \( m(n+1) + 1 - m = m(n+1) + 1 - m = m(n) + 1 \) other intervals remaining.

     By the induction hypothesis, among these remaining intervals, there are either \( m \) intervals that share a common point, or \( n \) intervals that are pairwise disjoint. If there are \( n \) intervals that are pairwise disjoint, then these \( n \) intervals and \( [a_1, b_1] \) form \( n+1 \) disjoint intervals, and we are done.

     If there are \( m \) intervals that share a common point, then we have found our \( m \) intervals.

3. **Application to the Main Problem:**
   Consider 2016 intervals \( A_i = [a_i, b_i] \) for \( i = 1, 2, \ldots, 2016 \) such that \( A_i \) is the period of time that customer \( i \) is in the store. By the lemma, if we write \( 2016 = mn + 1 \), there are at least \( \min(m, n) \) customers that satisfy the condition.

4. **Maximizing \( k \):**
   To maximize \( k \), we need to find the largest integer \( k \) such that \( k^2 \leq 2016 \). Solving for \( k \):

   \[
   k^2 \leq 2016 \implies k \leq \sqrt{2016} \approx 44.9
   \]

   Therefore, the greatest integer \( k \) is \( \lfloor \sqrt{2016} \rfloor = 44 \).

5. **Verification:**
   To show that this bound is optimal, we can use the algorithm in the proof of the lemma to construct the intervals and verify that \( k = 44 \) is indeed the maximum number of customers that can be found such that either all of them have been at the store at the same time, or any two of them have not been at the store at the same time.

The final answer is \( \boxed{44} \).