// hloya template v25
// ░░░░░░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░░░░░
// ░░░░░░█░░▄▀▀▀▀▀▀▀▀▀▀▀▀▀▄░░█░░░░░
// ░░░░░░█░█░▀░░░░░▀░░▀░░░░█░█░░░░░
// ░░░░░░█░█░░░░░░░░▄▀▀▄░▀░█░█▄▀▀▄░
// █▀▀█▄░█░█░░▀░░░░░█░░░▀▄▄█▄▀░░░█░
// ▀▄▄░▀██░█▄░▀░░░▄▄▀░░░░░░░░░░░░▀▄
// ░░▀█▄▄█░█░░░░▄░░█░░░▄█░░░▄░▄█░░█
// ░░░░░▀█░▀▄▀░░░░░█░██░▄░░▄░░▄░███
// ░░░░░▄█▄░░▀▀▀▀▀▀▀▀▄░░▀▀▀▀▀▀▀░▄▀░
// ░░░░█░░▄█▀█▀▀█▀▀▀▀▀▀█▀▀█▀█▀▀█░░░
// ░░░░▀▀▀▀░░▀▀▀░░░░░░░░▀▀▀░░▀▀░░░░
#include <bits/stdc++.h>
#include <valarray>
using namespace std;
bool dbg = 0;
clock_t start_time = clock();
#define current_time fixed<<setprecision(6)<<(ld)(clock()-start_time)/CLOCKS_PER_SEC
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define ll long long
#define ld long double
#define pii pair<int,int>
#define umap unordered_map<int, int>
#define files1 freopen("input.txt","r",stdin)
#define files2 freopen("out2.txt","w",stdout)
#define files files1;files2
#define fast_io ios_base::sync_with_stdio(0);cin.tie(0)
#define endl '\n'
#define ln(i,n) " \n"[(i) == (n) - 1]
void bad(string mes = "Impossible"){cout << mes;exit(0);}
void bad(int mes){cout << mes;exit(0);}
template<typename T>
string bin(T x, int st = 2){
string ans = "";
while (x > 0){
ans += char('0' + x % st);
x /= st;
}
reverse(ans.begin(), ans.end());
return ans.empty() ? "0" : ans;
}
template<typename T>
void amax(T& x, T y) {
x = max(x, y);
}
template<typename T>
void amin(T& x, T y) {
x = min(x, y);
}
inline int popcount(int x){
int count = 0;
__asm__ volatile("POPCNT %1, %0;":"=r"(count):"r"(x):);
return count;
}
template<typename T>
T input(){
T ans = 0, m = 1;
char c = ' ';
while (!((c >= '0' && c <= '9') || c == '-')) {
c = getchar();
}
if (c == '-')
m = -1, c = getchar();
while (c >= '0' && c <= '9'){
ans = ans * 10 + (c - '0'), c = getchar();
}
return ans * m;
}
template<typename T> void read(T& a) { a = input<T>(); }
template<typename T> void read(T& a, T& b) { read(a), read(b); }
template<typename T> void read(T& a, T& b, T& c) { read(a, b), read(c); }
template<typename T> void read(T& a, T& b, T& c, T& d) { read(a, b), read(c, d); }
const int inf = 1e9 + 20;
const short short_inf = 3e4 + 20;
const long double eps = 1e-12;
const int maxn = 5e5 + 12, base = 1e9 + 7;
const ll llinf = 2e18 + 5;
template<typename T>
T binpow(T n, T s)
{
if (s <= 0)
return 1LL;
if (s % 2 == 0){
T b = binpow(n, s / 2);
return ( 1LL * b * b ) % base;
} else {
return (1LL* binpow(n, s - 1) * n) % base;
}
}
struct pt {
ld x, y;
pt(){}
pt(ld x, ld y):x(x),y(y){}
};
ld sqr(ld x) {
return x * x;
}
ld dist(pt v1, pt v2) {
return sqrt(sqr(v1.x - v2.x) + sqr(v1.y - v2.y));
}
ld angle(pt v1, pt v2, pt v3) {
ld d1 = dist(v2, v3);
ld d2 = dist(v1, v3);
ld d3 = dist(v1, v2);
ld cs = - (sqr(d2) - sqr(d1) - sqr(d3)) / (2 * d1 * d3);
// assert((ld)-1 - eps <= cs && cs <= (ld)1 + eps);
return acos(cs);
}
pt get_pt(int i, int n) {
return pt(cos((ld)2 * M_PI * i / n), sin((ld)2 * M_PI * i / n));
}
ld deg(ld rad) {
return rad / M_PI * (ld)180;
}
int main() {
int n, a;
// files1;
cin >> n >> a;
ld cl = -1000000;
int ans1, ans2, ans3;
int v1 = 0;
for (int v3 = 1; v3 < n; v3++) {
if (v3 > 1) {
int v2 = v3 - 1;
ld ang = deg(angle(get_pt(v1, n), get_pt(v2, n), get_pt(v3, n)));
if (abs(ang - a) < abs(cl - a)) {
ans1 = v1;
ans2 = v2;
ans3 = v3;
cl = ang;
}
}
if (v3 + 1 < n) {
int v2 = v3 + 1;
ld ang = deg(angle(get_pt(v1, n), get_pt(v2, n), get_pt(v3, n)));
if (abs(ang - a) < abs(cl - a)) {
ans1 = v1;
ans2 = v2;
ans3 = v3;
cl = ang;
}
}
}
cout << ans1 + 1 << ' ' << ans2 + 1 << ' ' << ans3 + 1 << endl;
return 0;
}
Ly8gaGxveWEgdGVtcGxhdGUgdjI1CiAgCi8vIOKWkeKWkeKWkeKWkeKWkeKWkeKWkeKWhOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWgOKWhOKWkeKWkeKWkeKWkeKWkeKWkQovLyDilpHilpHilpHilpHilpHilpHilojilpHilpHiloTiloDiloDiloDiloDiloDiloDiloDiloDiloDiloDiloDiloDiloDiloTilpHilpHilojilpHilpHilpHilpHilpEKLy8g4paR4paR4paR4paR4paR4paR4paI4paR4paI4paR4paA4paR4paR4paR4paR4paR4paA4paR4paR4paA4paR4paR4paR4paR4paI4paR4paI4paR4paR4paR4paR4paRCi8vIOKWkeKWkeKWkeKWkeKWkeKWkeKWiOKWkeKWiOKWkeKWkeKWkeKWkeKWkeKWkeKWkeKWkeKWhOKWgOKWgOKWhOKWkeKWgOKWkeKWiOKWkeKWiOKWhOKWgOKWgOKWhOKWkQovLyDilojiloDiloDilojiloTilpHilojilpHilojilpHilpHiloDilpHilpHilpHilpHilpHilojilpHilpHilpHiloDiloTiloTilojiloTiloDilpHilpHilpHilojilpEKLy8g4paA4paE4paE4paR4paA4paI4paI4paR4paI4paE4paR4paA4paR4paR4paR4paE4paE4paA4paR4paR4paR4paR4paR4paR4paR4paR4paR4paR4paR4paR4paA4paECi8vIOKWkeKWkeKWgOKWiOKWhOKWhOKWiOKWkeKWiOKWkeKWkeKWkeKWkeKWhOKWkeKWkeKWiOKWkeKWkeKWkeKWhOKWiOKWkeKWkeKWkeKWhOKWkeKWhOKWiOKWkeKWkeKWiAovLyDilpHilpHilpHilpHilpHiloDilojilpHiloDiloTiloDilpHilpHilpHilpHilpHilojilpHilojilojilpHiloTilpHilpHiloTilpHilpHiloTilpHilojilojilogKLy8g4paR4paR4paR4paR4paR4paE4paI4paE4paR4paR4paA4paA4paA4paA4paA4paA4paA4paA4paE4paR4paR4paA4paA4paA4paA4paA4paA4paA4paR4paE4paA4paRCi8vIOKWkeKWkeKWkeKWkeKWiOKWkeKWkeKWhOKWiOKWgOKWiOKWgOKWgOKWiOKWgOKWgOKWgOKWgOKWgOKWgOKWiOKWgOKWgOKWiOKWgOKWiOKWgOKWgOKWiOKWkeKWkeKWkQovLyDilpHilpHilpHilpHiloDiloDiloDiloDilpHilpHiloDiloDiloDilpHilpHilpHilpHilpHilpHilpHilpHiloDiloDiloDilpHilpHiloDiloDilpHilpHilpHilpEKICAKI2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNpbmNsdWRlIDx2YWxhcnJheT4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKICAKYm9vbCBkYmcgPSAwOwogIApjbG9ja190IHN0YXJ0X3RpbWUgPSBjbG9jaygpOwojZGVmaW5lIGN1cnJlbnRfdGltZSBmaXhlZDw8c2V0cHJlY2lzaW9uKDYpPDwobGQpKGNsb2NrKCktc3RhcnRfdGltZSkvQ0xPQ0tTX1BFUl9TRUMKICAKI2RlZmluZSBmIGZpcnN0CiNkZWZpbmUgcyBzZWNvbmQKI2RlZmluZSBtcCBtYWtlX3BhaXIKI2RlZmluZSBwYiBwdXNoX2JhY2sKI2RlZmluZSBhbGwoeCkgKHgpLmJlZ2luKCksICh4KS5lbmQoKQogIAojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIGxkIGxvbmcgZG91YmxlCiNkZWZpbmUgcGlpIHBhaXI8aW50LGludD4KI2RlZmluZSB1bWFwIHVub3JkZXJlZF9tYXA8aW50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CiAgICAvLyBmaWxlczE7CiAgICBjaW4gPj4gbiA+PiBhOwogICAgbGQgY2wgPSAtMTAwMDAwMDsKCiAgICBpbnQgYW5zMSwgYW5zMiwgYW5zMzsKCiAgICBpbnQgdjEgPSAwOwogICAgZm9yIChpbnQgdjMgPSAxOyB2MyA8IG47IHYzKyspIHsKICAgICAgICBpZiAodjMgPiAxKSB7CiAgICAgICAgICAgIGludCB2MiA9IHYzIC0gMTsKICAgICAgICAgICAgbGQgYW5nID0gZGVnKGFuZ2xlKGdldF9wdCh2MSwgbiksIGdldF9wdCh2MiwgbiksIGdldF9wdCh2MywgbikpKTsKICAgICAgICAgICAgaWYgKGFicyhhbmcgLSBhKSA8IGFicyhjbCAtIGEpKSB7CiAgICAgICAgICAgICAgICBhbnMxID0gdjE7CiAgICAgICAgICAgICAgICBhbnMyID0gdjI7CiAgICAgICAgICAgICAgICBhbnMzID0gdjM7CiAgICAgICAgICAgICAgICBjbCA9IGFuZzsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBpZiAodjMgKyAxIDwgbikgewogICAgICAgICAgICBpbnQgdjIgPSB2MyArIDE7CiAgICAgICAgICAgIGxkIGFuZyA9IGRlZyhhbmdsZShnZXRfcHQodjEsIG4pLCBnZXRfcHQodjIsIG4pLCBnZXRfcHQodjMsIG4pKSk7CiAgICAgICAgICAgIGlmIChhYnMoYW5nIC0gYSkgPCBhYnMoY2wgLSBhKSkgewogICAgICAgICAgICAgICAgYW5zMSA9IHYxOwogICAgICAgICAgICAgICAgYW5zMiA9IHYyOwogICAgICAgICAgICAgICAgYW5zMyA9IHYzOwogICAgICAgICAgICAgICAgY2wgPSBhbmc7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8IGFuczEgKyAxIDw8ICcgJyA8PCBhbnMyICsgMSA8PCAnICcgPDwgYW5zMyArIDEgPDwgZW5kbDsKICAgIHJldHVybiAwOwp9