#include <bits/stdc++.h>

using namespace std;

int main()
{
    ios_base::sync_with_stdio( false ), cin.tie( nullptr ), cout.tie( nullptr );

    map<int,vector<int>> polygon;

    for( int ang = 1; ang < 180; ang++ )
    {
        int n, a = 180, b = 180 - ang, g = __gcd(a,b);

        if ( ( a /= g, b /= g ) == 1 )
            n = 2 * a;
        else
            n = a;

        polygon[n].push_back(ang);
    }

    cout << "% " << polygon.size() << " polygons."  << endl,
    cout << "% polygon(N,InscribedAngles)." << endl << endl;

    for(auto p: polygon)
    {
        auto q = p.second;

        cout << "polygon(" << p.first << ",[" << q.front();

        for(int i = 1, r = q.size(); i < r; i++)
            cout << ',' << q[i];

        cout << "])." << endl;
    }
}