#include <bits/stdc++.h>
using namespace std;
int M = 1000000007;
map<long long int, long long int> mp;
set<long long> s1, s2;
vector<long long> v, w;
long long int m, n, c, d, i, j, l, r, x, t, y, u, b;
string s, p, q;
char ch, ck;
double bl, k;
int main() {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  bl = (n * k * 1.0) / 180.0;
  bl = round(bl);
  c = bl;
  c = max(1ll, c);
  c = min(c, n - 2);
  cout << 1 << " " << c + 2 << " " << c + 1;
}
