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;
void reader(int *x) {
  int k, m = 0;
  *x = 0;
  for (;;) {
    (k) = getchar();
    if (k == '-') {
      m = 1;
      break;
    }
    if ('0' <= k && k <= '9') {
      *x = k - '0';
      break;
    }
  }
  for (;;) {
    (k) = getchar();
    if (k < '0' || k > '9') break;
    *x = (*x) * 10 + k - '0';
  }
  if (m) (*x) = -(*x);
}
void writer(int x, char c) {
  int i, sz = 0, m = 0;
  char buf[10];
  if (x < 0) m = 1, x = -x;
  while (x) buf[sz++] = x % 10, x /= 10;
  if (!sz) buf[sz++] = 0;
  if (m) putchar('-');
  while (sz--) putchar(buf[sz] + '0');
  putchar(c);
}
long long dp[510][510];
long long pw[125510];
long long pwpw[510][510];
int main() {
  int N, K;
  int i, j, l, m;
  pw[0] = 1;
  for (i = 1; i < 125510; i++) {
    pw[i] = pw[i - 1] * 2;
    if (pw[i] >= 1000000007) pw[i] -= 1000000007;
  }
  for (i = 0; i < 501; i++)
    for (m = 1; m < i + 1; m++)
      pwpw[i][m] = (pw[m] - 1) * pw[m * (i - m)] % 1000000007;
  reader(&N);
  reader(&K);
  for (i = 0; i < 501; i++)
    for (j = 0; j < 501; j++) dp[i][j] = 0;
  for (i = 0; i < 501; i++) dp[i][0] = 1;
  for (i = 0; i < 501; i++)
    for (j = 1; j < i + 1; j++) {
      dp[i][j] = 0;
      for (m = 1; m < i + 1; m++)
        dp[i][j] = (dp[i][j] + dp[i - m][j - 1] * pwpw[i][m]) % 1000000007;
    }
  dp[N][K] %= 1000000007;
  if (dp[N][K] < 0) dp[N][K] += 1000000007;
  writer((int)dp[N][K], '\n');
  return 0;
}