#include <bits/stdc++.h>
using std::cin;
using std::cout;
using std::endl;
const long long INF = 1 << 30;
const long long MOD = 1e9 + 7;
const int N = 1e6 + 10;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int x = n / 2, y = m / 2;
  for (int i = 1; i <= x; ++i)
    for (int j = 1; j <= m; ++j) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", n - i + 1, m - j + 1);
    }
  if (n & 1) {
    int y = m >> 1;
    for (int i = 1; i <= y; ++i) {
      printf("%d %d\n", n / 2 + 1, i);
      printf("%d %d\n", n / 2 + 1, m - i + 1);
    }
    if (m & 1) printf("%d %d\n", n / 2 + 1, m / 2 + 1);
  }
  return 0;
}
