Problem: Let's assume that set S consists of m distinct intervals [l1, r1], [l2, r2], ..., [lm, rm] (1 ≤ li ≤ ri ≤ n; li, ri are integers).

Let's assume that f(S) is the maximum number of intervals that you can choose from the set S, such that every two of them do not intersect. We assume that two intervals, [l1, r1] and [l2, r2], intersect if there is an integer x, which meets two inequalities: l1 ≤ x ≤ r1 and l2 ≤ x ≤ r2.

Sereja wonders, how many sets S are there, such that f(S) = k? Count this number modulo 1000000007 (109 + 7).

Input

The first line contains integers n, k (1 ≤ n ≤ 500; 0 ≤ k ≤ 500).

Output

In a single line, print the answer to the problem modulo 1000000007 (109 + 7).

Examples

Input

3 1


Output

23


Input

3 2


Output

32


Input

2 0


Output

1


Input

2 2


Output

2

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void minu(T& x, T y) {
  x = min(x, y);
}
template <class T>
inline void maxu(T& x, T y) {
  x = max(x, y);
}
inline long long bit(long long n) { return 1LL << n; }
template <class T>
ostream& operator<<(ostream& os, vector<T> x) {
  for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
    os << *it << ' ';
  return os;
}
long long dx[8] = {1, -1, 0, 0, -1, 1, 1, -1};
long long dy[8] = {0, 0, 1, -1, -1, 1, -1, 1};
const long long mod = 1e9 + 7;
long long pow2[200005];
long long memo[505][505];
long long rec(long long n, long long k, long long t) {
  if (k < 0) return 0;
  if (t == 0) {
    return k == 0 ? 1 : 0;
  }
  if (n == 0) {
    return (k == 0 && t == 0) ? 1 : 0;
  }
  if (t < n) {
    return rec(t, k, t) * pow2[t * (n - t)] % mod;
  }
  long long& ret = memo[n][k];
  if (ret >= 0) return ret;
  ret = 0;
  for (long long bt = 0; bt < ((long long)n); ++bt) {
    ret +=
        rec(n - 1, k - 1, bt) * (pow2[n - bt] - 1 + mod) % mod * pow2[bt] % mod;
    ret %= mod;
  }
  return ret;
}
int main() {
  long long n, k;
  cin >> n >> k;
  pow2[0] = 1;
  for (long long i = 0; i < ((long long)200000); ++i)
    pow2[i + 1] = pow2[i] * 2 % mod;
  long long ans = 0;
  for (long long i = 0; i < ((long long)505); ++i)
    for (long long j = 0; j < ((long long)505); ++j) memo[i][j] = -1;
  for (long long t = 0; t < ((long long)n + 1); ++t)
    ans = (ans + rec(n, k, t)) % mod;
  cout << ans << endl;
  return 0;
}