#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const long long int INF = LLONG_MAX;
const long long int mod = 1e9 + 7;
int main() {
  long long int n, m;
  scanf("%lld%lld", &n, &m);
  vector<vector<bool> > vis(n + 1, vector<bool>(m + 1, false));
  for (long long int i = 1; i <= n / 2 + n % 2; i++) {
    long long int toprow = i;
    long long int botrow = n - i + 1;
    long long int topy = 1;
    long long int boty = m;
    bool flag = true;
    while (!(topy > m && boty < 1)) {
      if (flag) {
        flag = false;
        if (topy <= m && !vis[toprow][topy]) {
          printf("%lld %lld\n", toprow, topy);
          vis[toprow][topy] = true;
        }
        topy++;
      } else {
        flag = true;
        if (boty >= 1 && !vis[botrow][boty]) {
          printf("%lld %lld\n", botrow, boty);
          vis[botrow][boty] = true;
        }
        boty--;
      }
    }
  }
  cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
