```
class TwoSum(object):
def __init__(self):
"""
initialize your data structure here
"""
self.numbers = []
self.hash = {}
def add(self, number):
"""
Add the number to an internal data structure.
:rtype: nothing
"""
if number not in self.hash:
self.hash[number] = 1
self.numbers.append(number)
else:
self.hash[number] += 1
def find(self, value):
"""
Find if there exists any pair of numbers which sum is equal to the value.
:type value: int
:rtype: bool
"""
for num in self.numbers:
if value - num in self.hash:
if value - num == num and self.hash[num] == 1:
continue
return True
return False
# Your TwoSum object will be instantiated and called as such:
# twoSum = TwoSum()
# twoSum.add(number)
# twoSum.find(value)
```