#include <bits/stdc++.h>
template <class T>
inline T gcd(T a, T b) {
  a = abs(a);
  b = abs(b);
  if (!b) return a;
  return __gcd(b, a % b);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / __gcd(a, b)) * b;
}
template <class T>
inline T ncr(T n, T r) {
  return n * (n - 1) / r;
}
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, a;
  cin >> n >> a;
  double total = ((n - 2) * 180) / float(n);
  double temp = total;
  double mi = float(180) / n;
  double ans = 10000000000;
  int loc = -1;
  for (int i = 1; i <= n - 2; i++) {
    if (abs(temp - a) < ans) {
      ans = abs(temp - a);
      loc = i;
    }
    temp -= mi;
  }
  cout << 1 << " " << loc + 1 << " " << loc + 2;
  return 0;
}
