import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.TreeSet;
import java.lang.Integer;
public class fence_kp_java {
static int nextInt() {
try {
st.nextToken();
return (int) st.nval;
return 0;
}
}
public static void main
(String[] args
) { int t = nextInt();
for(int i=0;i<t;i++) {
int a=nextInt();
if(360%(180-a)==0) {
} else {
}
}
}
}
CmltcG9ydCBqYXZhLmlvLkJ1ZmZlcmVkUmVhZGVyOwppbXBvcnQgamF2YS5pby5JT0V4Y2VwdGlvbjsKaW1wb3J0IGphdmEuaW8uSW5wdXRTdHJlYW1SZWFkZXI7CmltcG9ydCBqYXZhLmlvLlN0cmVhbVRva2VuaXplcjsKaW1wb3J0IGphdmEudXRpbC5BcnJheUxpc3Q7CmltcG9ydCBqYXZhLnV0aWwuQ29sbGVjdGlvbnM7CmltcG9ydCBqYXZhLnV0aWwuSXRlcmF0b3I7CmltcG9ydCBqYXZhLnV0aWwuVHJlZVNldDsKaW1wb3J0IGphdmEubGFuZy5JbnRlZ2VyOwoKcHVibGljIGNsYXNzIGZlbmNlX2twX2phdmEgewoKICAgIHN0YXRpYyBTdHJlYW1Ub2tlbml6ZXIgc3QgPSBuZXcgU3RyZWFtVG9rZW5pemVyKG5ldyBCdWZmZXJlZFJlYWRlcihuZXcgSW5wdXRTdHJlYW1SZWFkZXIoU3lzdGVtLmluKSkpOwoKICAgIHN0YXRpYyBpbnQgbmV4dEludCgpIHsKICAgICAgICB0cnkgewogICAgICAgICAgICBzdC5uZXh0VG9rZW4oKTsKICAgICAgICAgICAgcmV0dXJuIChpbnQpIHN0Lm52YWw7CiAgICAgICAgfSBjYXRjaCAoSU9FeGNlcHRpb24gZXgpIHsKICAgICAgICAgICAgcmV0dXJuIDA7CiAgICAgICAgfQogICAgfQoKCiAgICBwdWJsaWMgc3RhdGljIHZvaWQgbWFpbihTdHJpbmdbXSBhcmdzKSB7CiAgICAgICAgaW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