#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j;
  cin >> n >> m;
  for (i = 1; i <= n / 2; i++) {
    for (j = 1; j <= m; j++) {
      cout << i << " " << j << '\n';
      cout << n - i + 1 << " " << m - j + 1 << '\n';
    }
  }
  if (n % 2) {
    j = m;
    for (i = 1; i <= m; i++) {
      cout << (n + 1) / 2 << " " << i << '\n';
      if (i >= j) break;
      cout << (n + 1) / 2 << " " << j << '\n';
      j--;
      if (i >= j) break;
    }
  }
}
