#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long i, j, lt, d, z, v, c, r, l, t1, k, h, n, u, m, q, ts, te, x, y;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m;
  k = n / 2 + n % 2;
  x = n - 1;
  y = m - 1;
  long long tx = 1;
  long long ty = 1;
  cout << tx << " " << ty << "\n";
  for (i = 1; i <= k; i++) {
    d = 2 * m - 1;
    if (i == k && n % 2) d = m - 1;
    for (j = 1; j <= d; j++) {
      if (j % 2 == 1) {
        tx += x;
        ty += y;
        cout << tx << " " << ty << "\n";
        y--;
      } else {
        tx -= x;
        ty -= y;
        cout << tx << " " << ty << "\n";
        y--;
      }
    }
    x--;
    if (i != k) {
      tx -= x;
      cout << tx << " " << ty << "\n";
    }
    x--;
    y = m - 1;
  }
}
