#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int m, n;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n / 2; i++)
    for (int j = 1; j <= m; j++) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", n + 1 - i, m + 1 - j);
    }
  if (n & 1) {
    (n += 1) >>= 1;
    for (int j = 1; j <= m / 2; j++) {
      printf("%d %d\n", n, j);
      printf("%d %d\n", n, m + 1 - j);
    }
    if (m & 1) {
      (m += 1) >>= 1;
      printf("%d %d\n", n, m);
    }
  }
  return 0;
}
