```
class Solution(object):
def checkPerfectNumber(self, num):
"""
:type num: int
:rtype: bool
"""
if(num<=0):
return False
l=[]
for i in np.arange(1,np.sqrt(num)):
if(num%i==0):
l.append(i)
l.append(num//i)
if ((sum(l)-num)==num):
return True
else:
return False
```