Given a number and check if a number is perfect or not. A number is said to be perfect if sum of all its factors excluding the number itself is equal to the number.

**Input:**

First line consists of **T** test cases. Then T test cases follow .Each test case consists of a number **N.**

**Output:**

Output in a single line 1 if a number is a perfect number else print 0.

**Constraints:**

1<=**T**<=300

1<=**N**<=10000

**Example:**

**Input:**

2

6

21

**Output:**

1

0

:p | 459 |

Anshul Wadhawan | 414 |

Shivam_Kumar_Singh | 308 |

Calahan | 294 |

facelessman_x | 287 |

Anshul Wadhawan | 874 |

rambo | 868 |

Calahan | 815 |

Suraj Kumar 14 | 768 |

Shivam_Kumar_Singh | 740 |

akhayrutdinov | 4698 |

Ibrahim Nash | 3664 |

sanjay05 | 3633 |

Quandray | 3515 |

surbhi_7 | 2748 |